I want my <html> and <body> tags to be the entire height of the viewport if the page is not tall enough to guarantee scrolling or the entire height of the webpage, if there is one.
I am currently using this CSS:
html, body { height: 100%; }
What works if the webpage is not high enough to scroll the user, however on a long webpage it will only move to the height of the viewport in the users browser. I also tried:
html, body { min-height: 100%; }
but this looks like the same effect as without a height declaration.
html css
James dawson
source share