0

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-#

Jaikar
  • 31
  • 6
  • 1
    Possible duplicate of [Meaning of numbers in col-md-4 , col-xs-1 , col-lg-2 in bootstrap](http://stackoverflow.com/questions/24175998/meaning-of-numbers-in-col-md-4-col-xs-1-col-lg-2-in-bootstrap) – gpinkas Feb 25 '16 at 21:26

1 Answers1

2

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

dstN
  • 332
  • 6
  • 21