htmlcssbootstrap-4bootstrap-grid

combining bootstrap breakpoints in class name


Do i really have to declare my bootstrap classes as a combination of all screen sizes and column span for responsiveness?

I am using <div class="col-md-4 col-sm-6 col-xs-12 col-lg-4 >


Solution

  • No. You don't have to declare all the bootstrap classes. The smaller breakpoint will be applied to all the larger ones unless you add a bigger breakpoint specifically.

    Only this will suffice:

    <div class="col-xs-12 col-sm-6 col-md-4"></div>