Sunday, January 1, 2017

CSS3: Make div 100% height of browser window

The viewport-percentage lengths are relative to the size of the initial containing block. When the height or width of the initial containing block is changed, they are scaled accordingly.

These units are vh (viewport height), vw (viewport width), vmin (viewport minimum length) and vmax (viewport maximum length).

example:
div {
    height:100vh;
}


Ref:
html - Make div 100% height of browser window - Stack Overflow

No comments: