Multi column forms with fieldsets

后端 未结 2 1285
萌比男神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:30

    There are a couple of things that need to be adjusted in your layout:

    1. You are nesting col elements within form-group elements. This should be the other way around (the form-group should be within the col-sm-xx element).

    2. You should always use a row div for each new "row" in your design. In your case, you would need at least 5 rows (Username, Password and co, Title/First/Last name, email, Language). Otherwise, your problematic .col-sm-12 is still on the same row with the above 3 .col-sm-4 resulting in a total of columns greater than 12, and causing the overlap problem.

    Here is a fixed demo.

    And an excerpt of what the problematic section HTML should become:

    Personal Information

提交回复
热议问题