Arrangement of homemade markers in lists

    Task: to make home-made markers for lists.

    Using list-style-image is not always convenient due to unpredictable indentation. Therefore, I used to use a type construct
    ul li {
    padding-left: 10px;
    background: url (bullet.gif) 0 5px no-repeat;
    }

    Today, the idea came up to improve this construction a bit by setting the background position to a relative position:
    ul li {
    padding-left: 10px;
    background: url (bullet.gif) 0 0.5em no-repeat;
    }


    Advantages - the marker remains in place when the font is scaled. Crossbrowser.
    If necessary, I can add pictures, but, in my opinion, everything is clear.

    Also popular now: