From the course: Bootstrap 3 Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Styling a horizontal form

Styling a horizontal form - Bootstrap Tutorial

From the course: Bootstrap 3 Essential Training

Start my 1-month free trial

Styling a horizontal form

- One of the Bootstrap layouts that can be really useful when working with forms is called the horizontal layout. Now this is especially true for mobile users, because although labels to the left of input fields look great on the desktop, mobile devices zoom to an input field and can sometimes hide any labels that are on the left of the input field. These classes essentially use the Bootstrap grid system to show controls beside the labels on a wider layout. It's not going to work on a view that is smaller than 768 pixels. So I'm going to take this beginning form and just make the page a lot bigger, so that I can show you what it looks like. I'm going to scoot this over this way. The first step is to add the form horizontal class to your container element. So I'll do a class here and make this form horizontal. I'm going to save that. It's not going to do very much. It's just going to get rid of a little bit of the spacing here. After I do that, then I'm going to go to each of the form…

Contents