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>

In Bootstrap 4 and newer you have additional classes at your disposal with which you can e.g. achieve alignment.

Clone this wiki locally