From the course: Bootstrap 3 New Features and Migration

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Updating your forms

Updating your forms

The big thing about forms is that all form controls, including input, text area, and select element, are set to 100 width by default. So you can see the difference right here. You'll see that this field takes up the whole width of the container, whereas in the old version of Bootstrap, it would just default to a certain width. That's certainly more mobile friendly, so that's a great upgrade. Something you'll have to watch out for is that because all widths default to 100%, to use inline forms, you'll have to set the width of the form controls manually. One of the cool features of Bootstrap is the ability to create horizontal forms. Where the labels and fields are side by side. In the new Bootstrap, this is treated like any other layout, so you create a form with a class of form-horizontal, and then you use the col, col-lg, and then a number, just like this right here. Now this is different than the old version of Bootstrap, where you used to create a series of control groups. This…

Contents