html

Special Styled ul li tag using css  #angularjs #reactjs

  • dolor sit amet, Lorem ipsum dolor sit amet,
    • Point one
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    • Point two
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    • Clear the vertical line of list child drawn by :after pseudo element or draw them on all except the last one.
    • Stack Overflow works best with JavaScript enabled
    • Use :before pseudo element to draw horizontal line.


    @ng_real_ninja: Special Styled ul li tag using css #angularjs #reactjs

    • Point one
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    • Point two
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    • Point three
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    • Point four
      Lorem adipiscing elit.
    • Point five
      Lorem consectetur adipiscing elit.

    /*CSS*/ ul{list-style:none; padding:0} ul li { display: block; position: relative; padding: 0 0 0 40px; min-height:50px } li:last-child:after {display:none} ul li:after { content: ”; top: 11px; left: 0; background-color: #000; height: 100%; width: 2px; position: absolute; } ul li:before { content: ”; top: 10px; left: 0; background-color: #000; height: 2px; width: 30px; position: absolute; }

    * {box-sizing: border-box;} body { font: 16px/20px Arial, sans-serif; background: darkgreen; min-height: 100vh; padding: 30px; margin: 0; } .list { max-width: 500px; list-style: none; color: #fff; margin: 0; padding: 0 0 0 40px; } .list li { padding: 0 0 20px 40px; position: relative; } .list li:before, .list li:not(:last-child):after { position: absolute; background: #fff; content: ”; height: 2px; width: 50px; left: -30px; top: 10px; } .list li:not(:last-child):after { height: 100%; width: 2px; }

    html