100% height layout for mobile with two divs as buttons - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button layout

Description

100% height layout for mobile with two divs as buttons

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">

html, body {
   height: 100%;
}
section {<!-- w ww .  ja  v a 2  s.c  o  m-->
   height: 50%;
   width: 100%;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   padding: 10px;
}
section div {
   height: 100%;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   background-color: #333;
   border: 1px solid orange;
   color: white;
}


      </style> 
 </head> 
 <body> 
  <section> 
   <div>
     text1 
   </div> 
  </section> 
  <section> 
   <div>
     text2 
   </div> 
  </section>  
 </body>
</html>

Related Tutorials