Bootstrap col-md-offset-* not working
It works in bootstrap 4, there were some changes in documentation.We don't need prefix col-, just offset-md-3 e.g.
<div class="row">
<div class="offset-md-3 col-md-6"> Some content...
</div>
</div>
Here doc.
I would not recommend utilizing the Grid system in this instance, as much as simply adding an increased padding for each <h2>
. That being said, the way you would achieve this using col-*-offset-*
would be as follows:
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>One</h2>
</div>
<div class="col-md-11 col-md-offset-1">
<h2>Two</h2>
</div>
<div class="col-md-10 col-md-offset-2">
<h2>Three</h2>
</div>
</div>
</div>
</div>
Essentially the first line must span the entire row (so -12). The second line must be offset by 1 column, so you offset by 1 and give it a total width of 11 columns (11+1 = 12) and so forth. Your offset is always enough to ensure that the total column count equals 12.