I'm just a beginner in Bootstrap 4.
I just started learning it recently and sadly, I have been encountering problems already. I modified some code from the Bootstrap 4 manual itself. However, it fails miserably, with the offset not working properly. The code is perfectly simple and doesn't require a lot of code though.
EDIT: MAY 25, 2016 [12:35 PM (GMT+8)]:
Using Boootrap 3.3.6 release, col-md-offset-* is working. However, it is in Bootrap 4 that has failure.
Issue has been posted on https://github.com/twbs/bootstrap/issues/19966!
This is the code I used:
<!-- This contains the .red, .blue and .green classes -->
<style> ... </style>
<div class="container">
<div class="row">
<div class="col-md-4 red">
Hello world
</div>
<div class="col-md-4 col-offset-md-4 green">
Hello world
</div>
<div class="col-md-4 col-offset-md-4 blue">
Hello world
</div>
</div>
So, I doubted that there is in fact a class in bootstrap called "col-md-offset-*" as it fails to work. So, in Safari, I opened Develop > Show Web Inspector and took a look at the Bootstrap file that is linked via CDN. I searched for the class col-md-offset-4
, and it didn't appear. However, I saw md-offset-4
instead. I also saw that instead of the class col-md-push-4
, all I found is md-push-4
and so on and so forth. Therefore, I instead used the md-push-4
and it worked as good as the example in Bootstrap.
EDIT: MAY 25, 2016 [9:03 PM (GMT+8)]:
This addresses answer by user Nate Conley. By the way, this was taken from http://v4-alpha.getbootstrap.com/layout/grid/ as of the time this question was edited. Any change of the Bootstrap team is unforeseen or unknown at this time of writing.
Therefore, I modified the code and it works perfectly fine.
<style> ... </style>
<div class="container">
<div class="row">
<div class="col-md-4 red">
Hello world
</div>
<div class="col-md-4 offset-md-4 green">
Hello world
</div>
<div class="col-md-4 offset-md-4 blue">
Hello world
</div>
</div>