Answer the question
In order to leave comments, you need to log in
How to lay out 12 blocks in the full height of the screen of a mobile device?
If you count as usual:
var getBrowserHeight = document.documentElement.clientHeight,
getSectionHeight = getBrowserHeight / 12,
body
min-height: 100vh;
Answer the question
In order to leave comments, you need to log in
Everything turned out to be much simpler, it was necessary to specify >_< body
insteadmin-height
height
worth using flexbox
body {
display: flex;
flex-direction: column;
height: 100vh;
align-items: stretch;
}
.block {
flex-grow: 1;
flex-shrink: 1;
}
But what if 100% instead of 100vh try to set for body?
Or there is 1 more option, try to add in advance to the height, the height of the sidebar:
height: calc(100vh + 60px); 60px - /*примерная высота панели навигации, точно посмотрите сами*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question