Add vertical space to a horizontal list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Horizontal

Description

Add vertical space to a horizontal list

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">
.hometrailertypes>ul
 {
   list-style-type:none;
   text-align:center;
}

.hometrailertypes>ul>li
 {
   display:inline-block;
   margin:3px 0px;
}

.hometrailertypes>ul>li>a
 {
   padding:.3em .2em;
   background-color:Chartreuse;
   color:yellow;
   text-decoration:none;<!-- ww  w . j  av  a  2 s. c  om-->
   display:inline-block;
}

.hometrailertypes>ul>li>a:hover
 {
   background-color:blue;
   color:pink;
}
</style> 
 </head> 
 <body> 
  <div class="hometrailertypes"> 
   <ul> 
    <li> <a href="">Lorem ipsu</a> </li> 
    <li> <a href="">Lorem ipsum dolor</a> </li> 
    <li> <a href="">Lorem ipsum dolor </a> </li> 
    <li> <a href="">Lorem ipsum dolor sit am</a> </li> 
    <li> <a href="">Lorem ipsum dolor</a> </li> 
    <li> <a href="">Lorem ipsum dolor sit</a> </li> 
    <li> <a href="">Lorem ipsum dol</a> </li> 
    <li> <a href="">Lorem ipsum dolor sit amet, </a> </li> 
    <li> <a href="">Lorem</a> </li> 
    <li> <a href="">Lorem ipsum</a> </li> 
    <li> <a href="">Lorem ipsum dolor s</a> </li> 
    <li> <a href="">Lorem ipsum dolor sit </a> </li> 
    <li> <a href="">Lorem ipsum </a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials