Bootstrap 6 Columns Responsive
I want to have 6 columns responsive, I create this html but is not so good, maybe someone can give me the correct structure and css. The issue here is when I try to resize the wind
Solution 1:
Your html is wrong. Cols should always be inside a row. Also, if you modify a col padding or its margins, you will break bootstrap. If you want to touch that you have to do it via the source (less or sass). So that block classes you are adding to the cols, will for sure break bootstrap.
<divclass="container"><divclass="row"><divclass="col-xs-12">Whatever you want full row</div><divclass="col-xs-2">1</div><divclass="col-xs-2">2</div><divclass="col-xs-2">3</div><divclass="col-xs-2">4</div><divclass="col-xs-2">5</div><divclass="col-xs-2">6</div></div></div>
This (above) will give you 6 cols responsive. If you want to nest columns:
<divclass="container"><divclass="row"><divclass="col-xs-12"><divclass="row"><divclass="col-xs-2">1</div><divclass="col-xs-2">2</div><divclass="col-xs-2">3</div><divclass="col-xs-2">4</div><divclass="col-xs-2">5</div><divclass="col-xs-2">6</div></div></div></div></div>
If you need each col content to have padding you will have to apply the padding to a child div:
...
<div class="col-xs-2">
<div class="some-padding">
this content will have padding andnotbreak bootstrap
</div>
</div>
Post a Comment for "Bootstrap 6 Columns Responsive"