Make div 100% height of browser window



Source Code


<!doctype html>
<html>
     <head>
          <meta charset="utf-8">
          <title>Make div 100% height of browser window</title>
          <style>
               *{padding:0; margin:0; border:none;outline:none;}
               html,body{width:100%;height:100%; background:#ddd;}
               div.main{width:960px; height:auto; min-height:100%; background:#999; color:#333; text-                                          align:center; line-height:300px; margin:0 auto;}
          </style>
     </head>
     <body>
          <div class="main">Make div 100% height of browser window</div>
     </body>
</html>



Video tutorial




Share on Google Plus

About alpanadesign

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments: