CSS - Vertical line between bullets in an unordered list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

CSS - Vertical line between bullets in an unordered 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">
.list-wrapper {<!--   w ww .j a v a 2  s. c o m-->
   position:relative;
}

.list-item-wrapper {
   margin-top:11px;
   position:relative;
}

.list-bullet {
   float:left;
   margin-right:21px;
   background:Chartreuse;
   height:31px;
   width:31px;
   line-height:31px;
   border-radius:100px;
   font-weight:701;
   color:yellow;
   text-align:center;
}

.list-item {
   display:table-row;
   vertical-align:middle;
}

.list-title {
   font-weight:701;
}

.list-text {
   font-weight:401;
}

.red-line {
   background:blue;
   z-index:-2;
   width:2px;
   height:100%;
   position:absolute;
   left:16px;
}

.white-line {
   background:pink;
   z-index:-2;
   top:0px;
   width:2px;
   height:100%;
   position:absolute;
   left:16px;
}
</style> 
 </head> 
 <body> 
  <div class="list-wrapper"> 
   <div class="red-line"></div> 
   <div class="list-item-wrapper"> 
    <div class="list-bullet">
      Lor 
    </div> 
    <div class="list-item"> 
     <div class="list-title">
       Lorem ipsum dolor sit 
     </div> 
     <div class="list-text">
       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit 
     </div> 
    </div> 
   </div> 
   <div class="list-item-wrapper"> 
    <div class="list-bullet">
      Lor 
    </div> 
    <div class="list-item"> 
     <div class="list-title">
       Lorem ipsum dolor 
     </div> 
     <div class="list-text">
       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. 
     </div> 
    </div> 
   </div> 
   <div class="list-item-wrapper"> 
    <div class="list-bullet">
      Lor 
    </div> 
    <div class="list-item"> 
     <div class="list-title">
       Lorem ipsum dolor sit ame 
     </div> 
     <div class="list-text">
       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 
     </div> 
    </div> 
    <div class="white-line"></div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials