Add it to the row div like this.
Bootstrap add gutter between columns.
Content should be placed within columns and only columns may be immediate children of rows.
Which makes a gutter between of 30 px.
That padding is offset in rows for the first and last column via negative margin on rows.
Use container for a responsive pixel width or container fluid for width.
Columns create gutters gaps between column content via padding.
Bootstrap 3 3 3 9 gutters are created using padding.
100 across all viewport and device sizes.
You also must adjust the negative margin so that spacing around the outer columns is not affected.
To add a border in the gutter we will change the columns to use margin and padding and also add a left border.
Predefined classes like row and col sm 4 are available for quickly making grid layouts.
Extra css isn t necessary.
Each column has horizontal padding called a gutter for controlling the space between them.
Bootstrap 4 now has spacing utilities that make adding or substracting the space gutter between columns easier.
Div class row div class text center col md 6 div class mr 2 widget 1 div div div class text center col md 6 div class ml 2 widget 2 div div div.
Every column get a width of 940 12.
No gutter class col padding right.
For example we can write.
Just add the no gutter class to the row.
Rows are wrappers for columns.
Every column have a padding of 15 px on both sides.
We can use it to space and align content.
We will define a new class that when added to the container div row will override the default style for the columns.
Gutters let us add padding between columns.
This padding is then counteracted on the rows with negative margins.
I will name this class gutter border.