Problem: Declared in HTML page, page Div property Settings 100% page is not displayed properly
body { max-width: 720px; margin: 0 auto; }.case { background-color: #68CDD5; height: 100%; }
The case in the page is the largest div class, set the height:100%, the page does not display properly, the blue part is not covered with the entire page.
Cause: The parent tag is referenced when the HTML5 standard requires a height or width to be set as a percentage. Solve:
The label's parent tag is the label's height also needs to be defined, many people think this setting can also be displayed normally, but not, because the label's height is set to 100%, but the label parent tag is a label , this label also needs to define the height. So the final parameter to add is Html,body {height:100%;}.
Between HTML and body is a comma, not a space. Description This is a multi-label selector, not a derived selector.
html,body { max-width: 720px; margin: 0 auto; height: 100%; }.case { background-color: #68CDD5; height: 100%; }
The normal page is displayed as follows
<! DOCTYPE html> statement under div height 100%