Great way to resolve it here !
By default, Bootstrap does not provide a grid that allows us to create a layout of five columns, but as you can see, it is quite simple. First you need to create a default column definition as Bootstrap does. I called my classes col -..- 15.
.col-xs-15, .col-sm-15, .col-md-15, .col-lg-15 { position: relative; min-height: 1px; padding-right: 10px; padding-left: 10px; }
Next, you need to determine the width of the new classes in the case of various media queries.
.col-xs-15 { width: 20%; float: left; } @media (min-width: 768px) { .col-sm-15 { width: 20%; float: left; } } @media (min-width: 992px) { .col-md-15 { width: 20%; float: left; } } @media (min-width: 1200px) { .col-lg-15 { width: 20%; float: left; } }
You are now ready to combine your classes with the original Bootstrap classes. For example, if you want to create a div element that behaves like a layout of five columns on medium screens and like four columns on smaller screens, you just need to use something like this:
<div class="row"> <div class="col-md-15 col-sm-3"> ... </div> </div>
source share