Multi column forms with fieldsets

后端 未结 2 1235
萌比男神i
萌比男神i 2021-01-29 22:11

Sorry for the vague title, I wasn\'t sure how to describe it better. I\'m currently upgrading a website to bootstrap 3 and got a little problem with multiple inputs in one form

2条回答
  •  面向向阳花
    2021-01-29 22:38

    I disagree that .form-group should be within .col-*-n elements. In my experience, all the appropriate padding happens automatically when you use .form-group like .row within a form.

    Check out this demo.

    Altering the demo slightly by adding .form-horizontal to the form tag changes some of that padding.

    Check out this demo.

    When in doubt, inspect in Chrome or use Firebug in Firefox to figure out things like padding and margins. Using .row within the form fails in edsioufi's fiddle because .row uses negative left and right margins thereby drawing the horizontal bounds of the divs classed .row beyond the bounds of the containing fieldsets.

提交回复
热议问题