Align discs (bullets) of UL with the left edge of an enclosing DIV - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

Align discs (bullets) of UL with the left edge of an enclosing DIV

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 www.  j  a v  a2 s  .  c  om-->
   background:lightgreen;
   width:16em;
   margin-left:auto;
   margin-right:auto;
   font-size:3em;
}

div ul {
   list-style:none;
}

div ul li {
}
div ul li .disc {
   display:inline-block;
   width:0.6em;
   height:0.6em;
   border-radius:51%;
   background-color:Chartreuse;
   margin-right:11px;
}
</style> 
 </head> 
 <body> 
  <div> 
   <ul> 
    <li> <span class="disc"></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nis</li> 
    <li> <span class="disc"></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornar</li> 
    <li> <span class="disc"></span>Lorem ipsu</li> 
    <li> <span class="disc"></span>Lorem ip</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials