Horizontal Forms in Bootstrap 3: A Comprehensive Guide

Ruth Jul 09, 2026

In the realm of web development, Bootstrap has emerged as a go-to framework for creating responsive and mobile-first websites. One of its standout features is the ability to layout forms horizontally, aiding in creating cleaner and more intuitive user interfaces. This article delves into the intricacies of creating horizontal forms in Bootstrap 3, a version still widely used due to its robust features and community support.

Bootstrap Vertical Form, Horizontal Form, and Inline Form Example
Bootstrap Vertical Form, Horizontal Form, and Inline Form Example

Before we dive into the specifics, let's ensure we have the necessary Bootstrap files. For Bootstrap 3, you'll need the CSS and JavaScript files. You can include them in your HTML file like so:

Bootstrap 4: Align a Div or Form Vertically and Horizontally | AZMIND
Bootstrap 4: Align a Div or Form Vertically and Horizontally | AZMIND

```html ```

Setting Up Horizontal Forms

Bootstrap 3 uses a grid system to layout forms horizontally. The key to this is using the `.form-horizontal` class on the form element and the `.control-label` and `.col-lg-2` classes on the label elements.

Twitter Bootstrap 2.3.2 Tutorial 8 - Forms
Twitter Bootstrap 2.3.2 Tutorial 8 - Forms

Here's a basic example:

```html

```

Label Sizing

Bootstrap 3 Tutorial Pt.10 - Contact Form
Bootstrap 3 Tutorial Pt.10 - Contact Form

By default, Bootstrap 3 sets the label width to 150px. However, you can adjust this using the grid system. For instance, to make the label width 120px, use `.col-lg-2` instead of `.col-lg-3`.

Here's an example:

```html

```

Horizontal Form with Help Text

How alike are we form?
How alike are we form?

Sometimes, you might want to add help text to your form fields. This can be achieved using the `.help-block` class.

Here's an example:

```html

Your password must be at least 8 characters long.
```

Horizontal Form with Validation

Complete Beginner CSS Master Notes
Complete Beginner CSS Master Notes

Bootstrap 3 also provides built-in form validation. To use it in a horizontal form, you'll need to add the `.has-feedback` class to the form group and the `.glyphicon` class to the feedback icon.

Here's an example:

Developer Portfolio Website / Webdesign inspiration 2024
Developer Portfolio Website / Webdesign inspiration 2024
20 Splendid CSS3 Web Forms Tutorials
20 Splendid CSS3 Web Forms Tutorials
Background Design For Slides, Movie Credits Background, Background For Lyrics Song, Presentation Background Image, Praise Ppt Background, Gif Background For Ppt, Powerpoint Background Gif, Gif Blue Background, Alive Background
Background Design For Slides, Movie Credits Background, Background For Lyrics Song, Presentation Background Image, Praise Ppt Background, Gif Background For Ppt, Powerpoint Background Gif, Gif Blue Background, Alive Background
Booking Form Builder | SaaS Admin Dashboard UIUX by Be Confidency on Muzli
Booking Form Builder | SaaS Admin Dashboard UIUX by Be Confidency on Muzli
login and register form in HTML CSS #webdevelopment #software
login and register form in HTML CSS #webdevelopment #software
Oasis Discovered! Prime Python, Java, JS Services: Thirsty No More – Quench with Quality Orders!
Oasis Discovered! Prime Python, Java, JS Services: Thirsty No More – Quench with Quality Orders!
the pink website design is displayed on a white background
the pink website design is displayed on a white background
Foxia - Admin & Dashboard Template
Foxia - Admin & Dashboard Template
the dashboard is filled with data and statistics
the dashboard is filled with data and statistics
the type of tabs in design
the type of tabs in design
How to Create Forms in monday work management | TechRepublic
How to Create Forms in monday work management | TechRepublic
the dashboard screen shows an image of people in different countries, and there is also a map
the dashboard screen shows an image of people in different countries, and there is also a map
the dashboard screen shows data, graphs and other things to be viewed on it's desktop
the dashboard screen shows data, graphs and other things to be viewed on it's desktop
a computer screen with the words maximum adminn on it and an image of a monitor
a computer screen with the words maximum adminn on it and an image of a monitor
Materia - Responsive Admin Template free download
Materia - Responsive Admin Template free download
the dashboard is displayed with several different items on it, including numbers and data for each item
the dashboard is displayed with several different items on it, including numbers and data for each item
Formy - AI Form Builder Figma Template
Formy - AI Form Builder Figma Template
Ventic - Event Ticketing Bootstrap 5 Admin Template
Ventic - Event Ticketing Bootstrap 5 Admin Template
the dashboard screen shows data and graphs for each individual type of project, including numbers, times, and hours
the dashboard screen shows data and graphs for each individual type of project, including numbers, times, and hours

```html

```

Horizontal Form with Error Feedback

Similarly, you can add error feedback using the `.glyphicon-remove` class for the feedback icon and the `.error` class for the input field.

Here's an example:

```html

```

And there you have it! With these techniques, you can create horizontal forms in Bootstrap 3 that are not only responsive but also provide valuable feedback to users. Happy coding!