Using bottom with position relative - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Relative Position

Description

Using bottom with position relative

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">
#main-menu li {
   position:relative;
   display:inline-block;
   height:112px;
   border:2px solid Chartreuse;
}

#main-menu li a {
   display:table-cell;
   position:relative;
   vertical-align:bottom;
   height:112px;
}
</style> <!--from w w  w .  j ava 2 s . com-->
 </head> 
 <body> 
  <ul id="main-menu"> 
   <li> <a href="#">Lore</a> </li> 
   <li> <a href="#">Lorem </a> </li> 
   <li> <a href="#">Lore</a> </li> 
   <li> <a href="#">Lorem i</a> </li> 
   <li> <a href="#">Lore</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials