Sometimes we need to display the form's controls in one line. It is easy to implement such a form in the bootstrap framework, you only need to add the class name "Form-inline" to the <form> element.
If you want to add a label label in front of input, it causes input to be displayed in a newline. If you have to add a label like this, and you don't want input to wrap, you need to place the label label in the container "Form-group"
<formclass= "Form-inline"role= "form"> <Divclass= "Form-group"> <labelclass= "Sr-only" for= "ExampleInputEmail2">Mailbox</label> <inputtype= "Email"class= "Form-control"ID= "ExampleInputEmail2"placeholder= "Please enter your e-mail address"/> </Div> <Divclass= "Form-group"> <labelclass= "Sr-only" for= "ExampleInputPassword2">Password</label> <inputtype= "Password"class= "Form-control"ID= "ExampleInputPassword2"placeholder= "Please enter your email password"/> </Div> <Divclass= "checkbox"> <label> <inputtype= "checkbox"/>Remember the password</label> </Div> <Buttontype= "Submit"class= "Btn Btn-default">Go to Mailbox</Button></form>
The label tag uses a class name "Sr-only" to hide the label tag.
Bootstrap Series--13. Inline form