Text Aligned in li - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

Text Aligned in 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">
ul {<!-- w w  w .  ja v  a 2 s . com-->
   list-style-type:none;
   height:185px;
   padding:0;
   font-weight:301;
}

li a {
   display:inline-block;
   width:51%;
   text-align:left;
   border:2px solid Chartreuse;
}

li a:hover {
   cursor:pointer;
   background-color:yellow;
   color:blue;
}

a:link,
a:active {
   font-size:17px;
   color:pink;
   text-decoration:none;
   -webkit-transition:background-color 0.4s, border-color 0.4s;
   transition:background-color 0.4s, border-color 0.4s;
   line-height:3em;
}

a {
   width:100%;
   padding:0 0.6em;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#">Lore</a> </li> 
   <li> <a href="#">Lorem</a> </li> 
   <li> <a href="#">Lorem ipsu</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials