Boostrap: Add Border to Columns

Ruth Jul 09, 2026

In the realm of web development, Bootstrap has emerged as a powerful tool, offering a plethora of pre-built components and utilities to streamline the process. One of the most fundamental aspects of designing responsive layouts is the use of columns. While Bootstrap's grid system is robust, sometimes you might want to add a border to a column to separate content or draw attention. Let's delve into how you can achieve this.

How to Add Custom Metadata Columns to the Filters Pane in SharePoint Online
How to Add Custom Metadata Columns to the Filters Pane in SharePoint Online

Before we dive into the specifics, it's essential to understand that Bootstrap's grid system is based on a 12-column layout. Each column has a class like 'col-md-4' or 'col-lg-3', where 'md' and 'lg' refer to the screen size, and the number indicates the size of the column. Adding a border to a column involves using CSS, which Bootstrap allows you to do with ease.

Block Library: Column: Add predefined
Block Library: Column: Add predefined

Adding a Border to a Single Column

Bootstrap provides a simple way to add a border to a column using the border utilities. These utilities allow you to add a border on any side of an element or add a border around an entire element.

Use column formatting to customize SharePoint | Microsoft Docs
Use column formatting to customize SharePoint | Microsoft Docs

To add a border to a column, you can use the border utility classes directly on the column class. For example, to add a border to the right side of a column, you would use 'border-end'.

Using Border Utilities

an image of a column with measurements for it
an image of a column with measurements for it

Bootstrap's border utilities come in various flavors. You can add a border on the top ('border-top'), bottom ('border-bottom'), left ('border-start'), or right ('border-end') side of an element. You can also add a border around the entire element using 'border'.

Here's a simple example of adding a border to the right side of a column:

<div class="col-md-4 border-end">
  <h2>Column with Border</h2>
  <p>This column has a border on the right side.</p>
</div>

Customizing Border Styles

Printable Simple Merged Header Blank 10-Column Char Template
Printable Simple Merged Header Blank 10-Column Char Template

While the border utilities provide a quick way to add borders, you might want to customize the style, color, or width of the border. For this, you'll need to use custom CSS.

You can target the column class and apply your custom styles. For example, to change the color and width of the border, you could use the following CSS:

.col-md-4 {
  border-right-color: #ddd;
  border-right-width: 2px;
}

Adding Borders to Multiple Columns

Border Column
Border Column

Sometimes, you might want to add borders to multiple columns at once. While you could apply the border utilities to each column individually, this can become tedious, especially if you have many columns.

Instead, you can use the parent container of the columns to apply the border. This approach is more efficient and keeps your HTML clean.

Before & After DIY Porch Columns That Instantly Boost Curb Appeal!
Before & After DIY Porch Columns That Instantly Boost Curb Appeal!
TYPICAL ARRANGEMENT OF COLUMN TIES
TYPICAL ARRANGEMENT OF COLUMN TIES
the different types of pedestals are shown in this graphic diagram, and it is also labeled
the different types of pedestals are shown in this graphic diagram, and it is also labeled
Types of Columns used in Building Construction
Types of Columns used in Building Construction
Thoracic Vertebrae, Cervical Vertebrae, Licensed Practical Nurse, Back To College, Nursing School
Thoracic Vertebrae, Cervical Vertebrae, Licensed Practical Nurse, Back To College, Nursing School
Cột vườn
Cột vườn
an image of some papers and pencils on a table with the words under it
an image of some papers and pencils on a table with the words under it
different types and sizes of brick columns
different types and sizes of brick columns
three types of column based on ties
three types of column based on ties
the different types of columns are shown
the different types of columns are shown
the table is shown with different types of furniture
the table is shown with different types of furniture
three rows of columns with measurements for each column and the number of columns below them
three rows of columns with measurements for each column and the number of columns below them
How To Lay Brick Columns, How To Build A Brick Wall With Pillars, Pillar Brick Column Dimensions, How To Build Brick Pillars, How To Make A Brick Column, How To Build A Brick Pillar For Gate, Diy Driveway Columns, How To Build A Brick Column Around A Post, How To Build A Brick Pillar
How To Lay Brick Columns, How To Build A Brick Wall With Pillars, Pillar Brick Column Dimensions, How To Build Brick Pillars, How To Make A Brick Column, How To Build A Brick Pillar For Gate, Diy Driveway Columns, How To Build A Brick Column Around A Post, How To Build A Brick Pillar
an image of the side of a building with measurements
an image of the side of a building with measurements
the base of this column is formed with 1 / 6 and 3 / 8 square moulding ready for nail putty and paint
the base of this column is formed with 1 / 6 and 3 / 8 square moulding ready for nail putty and paint
Interior Column Wrap & Box Beam - WindsorONE
Interior Column Wrap & Box Beam - WindsorONE
8" Square Fiberglass Column
8" Square Fiberglass Column
the columns are all different sizes and colors
the columns are all different sizes and colors
Column Bases
Column Bases
Column And Post Wraps
Column And Post Wraps

Using the Container Class

Bootstrap's grid system uses a container class, like 'container' or 'container-fluid', to wrap the rows and columns. You can apply the border utilities to this container class to add borders to all the columns inside it.

Here's an example of adding a border to the bottom of all columns in a row:

<div class="container border-bottom">
  <div class="row">
    <div class="col-md-4">
      <h2>Column 1</h2>
      <p>This column has a border on the bottom.</p>
    </div>
    <div class="col-md-4">
      <h2>Column 2</h2>
      <p>This column also has a border on the bottom.</p>
    </div>
    <div class="col-md-4">
      <h2>Column 3</h2>
      <p>So does this one.</p>
    </div>
  </div>
</div>

In conclusion, adding a border to a Bootstrap column is a straightforward process. Whether you're adding a border to a single column or multiple columns, Bootstrap provides utilities and flexibility to achieve the desired result. So, go ahead and experiment with borders to enhance the visual appeal of your layouts.