Bootstrap Two-Column Horizontal Form

Ruth Jul 09, 2026

Creating responsive forms is a common task in web development, and Bootstrap, with its powerful grid system, simplifies this process significantly. One popular layout for forms is the horizontal form, which can be divided into two columns for better organization and readability. In this article, we'll guide you through creating a Bootstrap horizontal form with two columns.

HTML Form Validation with Bootstrap
HTML Form Validation with Bootstrap

Before we dive into the code, let's briefly discuss why you might want to use a horizontal form. Horizontal forms, also known as block forms, allow for better alignment of labels and inputs, making the form easier to scan and understand. They're particularly useful for longer or more complex forms.

37 Free Bootstrap Form Templates You Can Try Right Now
37 Free Bootstrap Form Templates You Can Try Right Now

Setting Up the Bootstrap Grid

The first step in creating a horizontal form is to set up the Bootstrap grid. Bootstrap uses a 12-column grid system, which we'll use to create two equal columns for our form.

Wizard
Wizard

We'll wrap our form in a container and then use the grid system to create two columns. Each column will take up 6 columns (or 'col-md-6' in Bootstrap's responsive grid system).

Creating the Form Container

How To Center a div Horizontally in Bootstrap 4
How To Center a div Horizontally in Bootstrap 4

First, we'll create a container for our form. In Bootstrap, a container is a responsive wrapper with some padding and a max-width. We'll use the default container class, 'container', which has a max-width of 1140px at the medium screen size.

Inside this container, we'll create a row using the 'row' class. This will allow us to use the grid system to create our columns.

Creating the Two Columns

Bootstrap Forms
Bootstrap Forms

Next, we'll create two columns using the 'col-md-6' class. This will make each column take up half the width of the container on medium and larger screens. On smaller screens, the columns will stack on top of each other due to Bootstrap's responsive design.

Inside each column, we'll start adding our form elements.

Adding Form Elements

Best Free Bootstrap Login Forms » CSS Author
Best Free Bootstrap Login Forms » CSS Author

Now that we have our grid set up, we can start adding form elements. In Bootstrap, form elements are styled using the 'form-control' class. This adds some basic styles and ensures that the inputs are the full width of their containing element.

We'll also use Bootstrap's form validation styles to make our form more user-friendly. This includes adding the 'is-valid' and 'is-invalid' classes to inputs based on their validity.

Bootstrap 3 Contact form with Validation
Bootstrap 3 Contact form with Validation
30 Best Free Bootstrap Wizards & Forms 2026 - Colorlib
30 Best Free Bootstrap Wizards & Forms 2026 - Colorlib
Best Bootstrap Admin Templates with Horizontal Menu and Tips
Best Bootstrap Admin Templates with Horizontal Menu and Tips
Tailwind Form with progress bar
Tailwind Form with progress bar
Bootstrap 5 Modal Form
Bootstrap 5 Modal Form
Bootstrap 5 popup form
Bootstrap 5 popup form
Oreo - HTML Admin Dashboard Template
Oreo - HTML Admin Dashboard Template
BOOTSTRAP INPUT FORM (2020) | HOW TO MAKE FORM IN BOOTSTRAP
BOOTSTRAP INPUT FORM (2020) | HOW TO MAKE FORM IN BOOTSTRAP
25+ Best Free Bootstrap Admin Dashboard Templates — Speckyboy
25+ Best Free Bootstrap Admin Dashboard Templates — Speckyboy
Login Form Bootstrap Templates
Login Form Bootstrap Templates
40 Best Free Admin Dashboard Templates 2026 - Colorlib
40 Best Free Admin Dashboard Templates 2026 - Colorlib
100+ Free Bootstrap 5 Templates » CSS Author
100+ Free Bootstrap 5 Templates » CSS Author
Login Form Template Bootstrap 5
Login Form Template Bootstrap 5
Bootstrap 5 Responsive Contact Form
Bootstrap 5 Responsive Contact Form
verigrubu_yetk_.png by cagatay celebioglu
verigrubu_yetk_.png by cagatay celebioglu
a table that has different types of items on it, including the names and numbers
a table that has different types of items on it, including the names and numbers
Bootstrap 4: What’s New
Bootstrap 4: What’s New
25+ Best Free Bootstrap Admin Dashboard Templates — Speckyboy
25+ Best Free Bootstrap Admin Dashboard Templates — Speckyboy
an email form with two different types of letters and numbers on the top right hand corner
an email form with two different types of letters and numbers on the top right hand corner
Responsive CSS3 Horizontal Application Form Fields
Responsive CSS3 Horizontal Application Form Fields

Labels and Inputs

For each form element, we'll use a label with the 'for' attribute set to the input's ID. This ensures that the label is associated with the input and that clicking the label focuses the input.

We'll also use the 'form-group' class to add some padding and margin around our inputs. This helps to separate the inputs and makes the form easier to read.

Form Validation

To add form validation, we'll use the 'is-valid' and 'is-invalid' classes on our inputs. We'll also add an 'invalid-feedback' element to provide feedback to the user when an input is invalid.

For example, we might have an input like this:

<div class="form-group">
  <label for="email">Email address</label>
  <input type="email" class="form-control is-invalid" id="email" placeholder="Enter email">
  <div class="invalid-feedback">Please provide a valid email address.</div>
</div>

Arranging Form Elements

With our grid and form elements set up, we can start arranging our form elements. In a horizontal form, labels and inputs are typically placed side by side. We can achieve this by using Bootstrap's inline-form class.

The 'form-inline' class removes the default vertical alignment and padding from form elements, allowing them to be placed side by side.

Aligning Labels and Inputs

To align our labels and inputs, we'll use the 'form-row' class to create a new row for each group of form elements. Inside this row, we'll use the 'col-form-label' and 'col' classes to align the label and input.

For example:

<div class="form-row">
  <label for="firstName" class="col-form-label col-md-3">First name</label>
  <input type="text" class="form-control col-md-9" id="firstName" placeholder="First name">
</div>

Arranging Form Elements Vertically

While horizontal forms are great for long forms, sometimes we want to arrange our form elements vertically. We can do this by removing the 'form-inline' class and using the default vertical alignment of form elements.

We can also use Bootstrap's flexbox utilities to align form elements vertically. For example, we can use the 'align-items-center' class on a flex container to vertically center its children.

And that's it! With these steps, you should be able to create a Bootstrap horizontal form with two columns. This layout can help to make your forms more organized and easier to use. As always, don't forget to test your form thoroughly to ensure that it works as expected on all devices.