height: 100vh
OR to set html, body and height: 100%
.height: 100vh;
for the element which can contain important(or unimportant) the content as if it will be a little space in the parent block(such, alas, happens), he will climb beyond the parent:the height: 100vh
sets strict height depending on the viewport of the browser. Of course, you can add overflow: hidden;
to the parent block and then child elements will be clipped, but it's a vile approach and for this you need to beat the hand because the child content may be cropped by half and it will look pathetic. In the code commented out line: /*overflow: hidden;*/
you can remove the comments and see pruning..element {
height: 100%;
min-height: 100vh;
}
Find more questions by tags CSS