Margin Auto With Table Cell - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Margin Auto With Table Cell

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">
#wrapper {<!--   www  .  ja v  a  2s.  c  o  m-->
   height:100vh;
   margin:auto;
   width:71vw;
   border:2px solid Chartreuse;
   display:table-cell;
   vertical-align:bottom;
}

#video {
   border:2px solid yellow;
   background-color:blue;
   height:100%;
}

#info {
   border:2px solid pink;
   background-color:OrangeRed;
   height:26%;
}

#container {
   display:table;
   margin:0 auto;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="wrapper"> 
    <div id="video"> 
    </div> 
    <div id="info"> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials