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

Home Forums CSS CSS counter none and counter skip

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

    I’m looking for a way to disable CSS counter. For example, I place an OL counter in my #content, but then in one specific case, I don’t want it to count anything. I can set the :before content to nothing, of course. But is there a way to just say “counter:none” ?

    2nd question.
    If I have an OL counter, and I place a UL inside the OL, it does a little wonky thing because it counts the UL items, then the OL appears to have skipped over a bunch of numbers.

    Here is a fiddle with the offensive LI marked in red:
    Is there a way to exclude the UL from the OL’s counter? Skip over it?



    Don’t wrap it in a list-item?


    In general yes, I’ve rearranged some of my WordPress theme so I catch one use-case and place it elsewhere, but still would like to know if there’s a way to catch the two scenarios above. For things like related search results in a 404 page, or whatnot that you might want to include.

    Andy Howells

    Give the LI a class and use .

    .class:before { display: none; }

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