Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

CSS - Style for list number

0 votes
62 views
added May 24 in CSS by LC Marshal Captain (25,420 points)
ol {
    // list-style: decimal;
    list-style: none;
    counter-reset: li;
    li {
        counter-increment: li;
        margin-left: 32px;
        .related-article {
            margin-bottom: 0;
            border-bottom: 0;
        }
        .line-breaker {
            border-bottom: 1px solid #d9d9d9;
            position: relative;
            left: -31px;
            width: 105%;
            @media (max-width: $break_m_lg) {
                width: 108%;
            }
            @media (max-width: $break_m_md) {
                width: 110%;
            }
        }
    }
    li::before {
        content: counter(li); 
        text-align: center;
        font-weight: 600;
        font-size: 30px;
        line-height: 0;
        position: relative;
        top: 33px;
        color: #228ffc;
        display: inline-block; 
        width: 1em;
        margin-left: -1.3em;
    }
}

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...