HTML CSS examples for CSS Layout:Relative Position
Setting height 100% in relative positioning
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body, html { height:100%; } div {<!--from w ww. ja v a2 s .c o m--> width:100%; height:100%; position:relative; background:red; } </style> </head> <body> <div></div> </body> </html>