Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap Submit Button Placement Not Behaving

Using a default/vertical form, the bootstrap documentation suggests that the submit button sits underneath the various inputs but that's not the case in my form.

When the browser has a large viewing space, it sits beside the last input field and is not in line. If you resize the browser to a phone or tablet width, Responsive takes over and it displays correctly.

Changing the wrapping div from .span12 to .span3 pushes the button down, but it seems like a hackish fix because adding .span3 to the inputs and buttons to make them uniform in size yields the button pushed off to the side.

Am I missing some markup or is there an issue with Bootstrap? In their docs, the button is preceded by a checkbox label and some help text wrapped in a p - so that could be affecting their styling to make it look correct.

like image 623
anjunatl Avatar asked Jul 15 '26 06:07

anjunatl


1 Answers

You have to put your submit button in a div with the class controls.

button on div.controls

If you check the source on the Bootstrap documentation page, they even divide all the inputs and buttons in control-groups and controls.

like image 81
Marcus Olsson Avatar answered Jul 17 '26 21:07

Marcus Olsson