Align unsorted list horizontally - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

Align unsorted list horizontally

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 {<!--from  w  w  w.  j  a va2  s.  c o m-->
   list-style-type:none;
   text-decoration:none;
   color:Chartreuse;
   background:none repeat scroll 0% 0% yellow;
   border:2px solid blue;
   border-radius:5px;
   display:block;
   margin:3px;
   padding:4px;
}

ol>li {
   float:left;
   width:301px;
   list-style:none;
}

h3 {
   color:pink;
   background:OrangeRed;
   border-radius:5px;
}
</style> 
 </head> 
 <body> 
  <ol> 
   <li> <h3>Lorem</h3> 
    <ul> 
     <li>Lorem ipsum dolor</li> 
     <li>Lorem ipsum dol</li> 
    </ul> </li> 
   <li> <h3>Lorem</h3> 
    <ul> 
     <li>Lorem ipsum do</li> 
     <li>Lorem ipsum do</li> 
    </ul> </li> 
  </ol>  
 </body>
</html>

Related Tutorials