Home > Mobile >  How to launch col-sm bootstrap class at screen size 768px?
How to launch col-sm bootstrap class at screen size 768px?

Time:05-26

At the screen size of 768px, the bootstrap class col-md is implemented. Is there a way to change this so that the class col-sm is implemented at this screen size instead?

These are the current defaults:

  • Extra Small (<576px) .col-
  • Small (>= 576px) .col-sm-
  • Medium (>=768px) .col-med-
  • Large (>=992px) .col-lg-
  • Extra Large (>=1200px) .col-xl-

CodePudding user response:

I think this is make sense

the code:

@media (min-width: 576px) {
  .col-sm {
    flex: 0 0 100% !important;
    margin-bottom: 10px !important;
  }
}

@media (min-width: 768px) {
  .col-sm {
    flex: 1 0 0% !important;
  }
}

but why you want to change the col-sm use col-md instead

  • Related