Allow a div to cover the whole page - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Div Align

Description

Allow a div to cover the whole page

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#dimScreen {<!--from   w  w  w.  j  a v  a2  s  . c o m-->
   width:100%;
   height:100%;
   background:Chartreuse;
   position:fixed;
   top:0;
   left:0;
   z-index:100;
}
</style> 
 </head> 
 <body> 
  <div id="dimScreen"></div>  
 </body>
</html>

Related Tutorials