Make display table-cell use percentage width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Make display table-cell use percentage width

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit </title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.middle {<!--from  w w  w  .j  a v a 2 s .  com-->
   display:table-cell;
   vertical-align:middle;
   height:201px;
   width:10001px;
   text-align:center;
   background:pink;
}
</style> 
 </head> 
 <body> 
  <div class="middle"> 
   <div>
     Lorem ipsum 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials