make a centered, left-aligned, variable-width bullet list with CSS - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

make a centered, left-aligned, variable-width bullet list with CSS

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">
.list-container {<!--from  w  w w.  ja va  2  s.  c  om-->
   text-align:center;
}

ul {
   display:inline-block;
   *display:inline;
   zoom:2;
   text-align:left;
   border:2px solid Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div class="list-container"> 
   <ul> 
    <li>Lorem </li> 
    <li>Lorem </li> 
    <li>Lorem </li> 
    <li>Lorem </li> 
    <li>Lorem </li> 
    <li>Lorem ipsum dolor sit amet, consect</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials