Centring Columns in Bootstrap

By Adam Patterson in: Code


center grids

Grids are great, Look at all that order that they provide!

I have been using them for years, but there are always certain instances where the grid fails, and you begin to loose the practicality of the grid.

For instance. If you had a 9 column grid and you need a 7 column wide centered row, no issues! Offset by one. But what if you had a 9 column grid and needed to center an 8 column row?

Make your own class and move on.

Oh wait, What about responsive layouts?

I guess we are on our own with this and we just lost predictability with out layout.

 

Following how Bootstrap generates their scaffolding I set out to create an easier way of dealing with centring structured grids, So enjoy!

 

Check out the Gist