Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Herst edited this page Oct 21, 2018 · 7 revisions

W009

Using empty spacer columns isn't necessary with Bootstrap's grid.

Instead of using an empty column just to occupy space and push the next column further to the right, you can just use Bootstrap's .col-*-offset-* classes.

Wrong:

<div class="col-xs-3"><!--spacer--></div>
<div class="col-xs-9">...</div>

Right:

<div class="col-xs-offset-3 col-xs-9">...</div>

To achieve horizontal alignment there you have additional classes at your disposal in Bootstrap 4 and newer. Also there are classes (margin utilities) which help you with moving sibling columns away from one another.

Clone this wiki locally