How can I add a margin or padding between Bootstrap columns?

pathfinder

Member
Joined
Oct 3, 2012
Messages
58
Points
8
I read more tips and good recommendations from people on this forum about Bootstrap and I am checking it with hopes to make a new and simple layout for a new blog. But from guides on Bootstrap document, I could not find out way to add a margin or padding between Bootstrap columns. How to solve this problem? can you guys share your experience?

All your inputs are welcomed.
 

Mike001

New member
Joined
Apr 27, 2016
Messages
578
Points
0
First and foremost you do not want to change the margin on a Bootstrap column as that will have a negative impact on the 12 column layout.

What you can do is add padding to the inside of the columns.

What I would do, and oh by the way I have done with some of my Bootstrap layouts. Is assign the columns that you want to modify a shared class name and then in your CSS stylesheet, not the Bootstrap CSS Stylesheet, add the padding settings that you want to effect those columns.

For instance:

.myClass {
padding: 0 .3em !important;
}


Make certain to include the important or there is a chance that the padding setting will not override the Bootstrap setting. I have done this many times and it has worked fine.

I hope this helps you out.
 

Mike001

New member
Joined
Apr 27, 2016
Messages
578
Points
0
It depends on what exactly you re trying to do with the columns.

There are always other ways to do things in programming, much of it depends on how skilled you are with the tool set you are using and what exactly you are trying to accomplish.

I use Bootstrap for probably 20% of the customer sites that I develop based on speed of development, their requirements for the site and ease of maintenance once they assume the site.

I have been teaching Bootstrap for many years and it is probably one of the best frameworks on the market. It is very light and responsive and can cover most anything that you want to do with a website or Blog. But to use it well you really need to understand how it works. Like anything else it has some limitations, not many but some.

Spacing columns is not a limitation, you can also use offsets with the columns if you are trying to have a scattered look with the layout. Using a combination of offsets, rows and the 12 column system you can lay our most anything with a little planning.

How familiar are you with Bootstrap?

Laying out a Blog in Bootstrap is probably one of the simpler layouts with the framework. Most blogs are merely boxes in the browser window, the easiest of all layouts with or without Bootstrap.

Why don't you PM me, or contact me on my site and you can gives some details on what you are trying to do and I can get you started.
 
Older threads
Replies
10
Views
5,396
Replies
22
Views
7,925
Replies
17
Views
6,019
Latest threads
Replies
0
Views
590
Replies
2
Views
789
Recommended threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top