The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Coloring the List-Style-Type for an Ordered List

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #250645

    I can’t for the life of me figure out how to color JUST the square list icon in an ordered list. Every code I try colors the square AND the test. All I want is the square to change to color #f05a23. Any help would be awesome!

    ol {
    list-style-type: square;
    margin-left: 0;
    padding-left: 1em;


    Wrapping the text in in the list-items in span‘s can work, but I don’t know if you can touch the HTML for this thing.

    Chris Coyier

    As a fork of @Atelierbram’s Pen, another method is to remove the list-style and apply the square via pseudo content.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.