Answer the question
In order to leave comments, you need to log in
How to set width under max-width 480px in bootstrap grid?
There are such blocks take.ms/DXVdV With a width of
less than 992px
, the blocks look like this take.ms/KPcPC I specifically set col-xs-6 for squares with numbers, because with a width of 480 to 768, if you set col-xs-12, then these rectangles with numbers will be too wide.
And now the question is, how to use the bootstrap grid to set these squares to 100% with a size of less than 480px?
Let me remind you that col-xs affects the width from 0 to 768px.
Answer the question
In order to leave comments, you need to log in
1. Add a breakpoint and a container
$screen-xs-min: 520px;
$container-xs: 480px;
.container {
@include container-fixed;
@media (min-width: $screen-xs-min) {
width: $container-xs;
}
// … Дальше оставляем как было
}
@mixin make-grid-columns($i: 1, $list: ".col-xxs-#{$i}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
@for $i from (1 + 1) through $grid-columns {
$list: "#{$list}, .col-xxs-#{$i} .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
}
…
@media (min-width: $screen-xs-min) {
@include make-grid(xs);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question