Why not accept height:100%?

there is a block, which is min-height:100%, inside this block is another block in which one header, this block I set height:100% but it did not take 100% as possible height and block height depend on content and not 100% available, why?
June 5th 19 at 21:14
2 answers
June 5th 19 at 21:16
You've got to understand what is 100% and all that that %.
The percent is a relative value.
That is, if you have a block parent with a fixed height, say 300px, the child block with the height property to 100% will have a size of 300px, respectively.

But if a block with height 100% will not be neither the 1st parent with a fixed height, by default, all those blocks inherit from the html and body height to auto, that is have no height if there is no content.

An example of one and the same unit with a parent with fixed height and no - https://codepen.io/you_web/pen/Zomvxa

That would make the height 100% of the size of the screen, just ask 100vh (you can Google more specific, but in General this is a new feature, where 1vh is 1% of the height of the screen, 1vw - 1% width of the screen)
Also, what would these properties (vh and vw) are displayed correctly on mobile devices you need to specify a viewport (also be sure to Google)
June 5th 19 at 21:18
Try this
html, body { height: 100%; min-height: 100%;}

Find more questions by tags CSSHTML