css set 100% body height (match to window height)
HTML[Edit]
+
0
-
0
CSS set 100% body height (match to window height)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15<!doctype html> <html> <head> <style> html, body { /* <-------------------- required html & body */ height: 100%; /* <--------------- required */ } </style> </head> <body> Body here ... </body> </html>
[Edit]
+
0
-
0
CSS set 100% body height (match to window height)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27<!doctype html> <html> <head> <style> html, body { /* <-------------------- required html & body */ height: 100%; /* <--------------- required */ } body { margin: 0; } div.layout { background: gold; width: 100%; height: 100%; } </style> </head> <body> <div class="layout"> Layout ... </div> </body> </html>