Reputation: 31
I saw the col and col-# classes on bootstrap template, what are these and when and when to use col and col-# classes? everywhere i only read about col-sm-# or col-md-# classes, i i don't see any information about col or col-#
Upvotes: 0
Views: 176
Reputation: 332
there are no col-#-classes.
you use col-xs-# / col-sm-# / col-md-# / col-lg-# for your layout.
easy as that:
xs is the grid on the smallest viewport <768px. (so two col-xs-6 are floating even on mobile)
if you use for example two col-sm-6 they are collapsing on mobile only. floating above: >768px.
if you use col-md-6 they are collapsing <992px and floating on all bigger viewports than that.
if you use col-lg-6 they are floating ONLY on viewports >1200px. below that they are collapsing.
Additional info: every set of 12 cols should be wrapped in a div.row. (you could also collapse after the 12th col but that will maybe need some CSS-fixes for your margins/paddings.
Further reading: http://getbootstrap.com/css/#grid
Upvotes: 2