Display: table-cell line up - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Display: table-cell line up

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum dolor sit amet, co</title> 
  <style>
* {<!--  ww w. j  a  va2  s  .  c o m-->
   margin:0px;
   padding:0px;
   outline:none;
}

body {
   font-family:Helvetica, Arial, sans-serif;
}

.center {
   width:1176px;
   margin:auto;
}

div#main {
   display:table;
   border-spacing:21px;
}

.column {
   display:table-cell;
   background:Chartreuse;
   color:yellow;
   vertical-align:top
}

div#posts {
   width:801px;
}

article, .widget {  }
article h3 {
   font-size:3em;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="center" id="main"> 
   <div class="column" id="posts"> 
    <article> 
     <h3>Lorem ipsum dol</h3> 
     <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imperdiet vel. Donec tortor diam, pretium vitae nibh vitae, consectetur lacinia sem. Proin luctus facilisis volutpat. Ut semper sit amet purus quis ornare. Quisque lobortis neque vitae tempor iaculis. Aliquam erat volutpat. Mauris tincidunt eget lacus eget pulvinar. Suspendisse potenti. Maecenas blandit tempus metus, eu ornare eros egestas sit amet</p> 
    </article> 
   </div> 
   <div class="column" id="side-bar"> 
    <div class="widget" id="recent-posts"> 
     <h4>Lorem ipsum </h4> 
     <ul> 
      <li> <a href="#">Lorem ipsum d</a> </li> 
      <li> <a href="#">Lorem ipsum d</a> </li> 
      <li> <a href="#">Lorem ipsum d</a> </li> 
      <li> <a href="#">Lorem ipsum d</a> </li> 
     </ul> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials