treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS counter none and counter skip

  • Hi, 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: http://jsfiddle.net/rjqgz/2/ Is there a way to exclude the UL from the OL's counter? Skip over it?

    Thanks!

  • 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.

  • Give the LI a class and use .

      .class:before { display: none; }