1

I'm using react-bootstrap, how to keep the button in the same line of my text field?

enter image description here

            <FormGroup>
                <InputGroup >
                    <FormControl
                        type="text"
                        placeholder="Search for artist"
                    />
                    <InputGroup.Append> 
                     <Button><Octicon  name="search"/></Button>
                    </InputGroup.Append>
                </InputGroup>
            </FormGroup>
2
  • Adding a class to the InputGroup and then on the css write that class as display: flex; w3schools.com/css/css3_flexbox.asp ? Commented Apr 19, 2020 at 22:51
  • 1
    @fedeteka it worked, please make answer to mark correct, thanks! Commented Apr 19, 2020 at 22:58

1 Answer 1

4

Adding a class to the InputGroup and then on the css write that class as

display: flex;

w3schools.com/css/css3_flexbox.asp

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.