Vertical-align in UL LI - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

Vertical-align in UL LI

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">
li span {
   display:inline-block;
   vertical-align:middle;<!--from  w  w w.  ja v a2  s.  c  o  m-->
}

.more {
   background-color:Chartreuse;
   height:51px;
   line-height:41px;
}

.moretwo {
   background-color:yellow;
   height:51px;
   vertical-align:sub;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li class="more"> <span>Lor</span> </li> 
   <li class="moretwo"> <span>Lor</span> </li> 
   <li class="more"> <span>Lor</span> </li> 
  </ul>  
 </body>
</html>

Related Tutorials