send the content inside divs with display: table-cell to the top of they container - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

send the content inside divs with display: table-cell to the top of they container

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">
.menu {<!--from w  ww .  j a  v  a  2  s  .co m-->
   display:table-cell;
   background-color:Chartreuse;
   width:21%;
   vertical-align:top;
}

.menu>div {
   padding:21px;
   background-color:yellow;
   vertical-align:top;
}

.content {
   display:table-cell;
   background-color:blue;
   width:81%;
   vertical-align:top;
}

h1 {
   margin:0
}
</style> 
 </head> 
 <body> 
  <div class="menu"> 
   <div></div> 
  </div> 
  <div class="content"> 
   <h1>Lorem ipsum do</h1> 
   <h1>Lorem ipsum do</h1> 
   <h1>Lorem ipsum do</h1> 
  </div>  
 </body>
</html>

Related Tutorials