Align two unordered lists side by side to the top - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:OL

Description

Align two unordered lists side by side to the top

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">
div {<!--from  w w  w  .ja va 2  s  .c  om-->
   display:inline-block;
   width:321px;
   vertical-align:top;
}
</style> 
 </head> 
 <body> 
  <div>
    UL 1: 
   <ul> 
    <li>line 1</li> 
    <li>line 2</li> 
   </ul> 
  </div> 
  <div>
    UL 2: 
   <ul> 
    <li>line 1</li> 
    <li>line 2</li> 
    <li>line 3</li> 
    <li>line 4</li> 
    <li>line 5</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials