Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 11, 2020 02:42 pm GMT

How to Reverse CSS Custom Counters

I needed a numbered list of blog posts to be listed with the last/high first and going down from there. Like this:

5. Post Title4. Post Title3. Post Title2. Post Title1. Post Title

But the above is just text. I wanted to do this with a semantic <ol> element.

The easy way

This can be done using HTML’ s reversed property on the <ol>:

<ol reversed<liThis</li<liList</li<liWill Be</li<liNumbered 

Read article “How to Reverse CSS Custom Counters”

The post How to Reverse CSS Custom Counters appeared first on CSS-Tricks.


Original Link: https://css-tricks.com/how-to-reverse-css-custom-counters/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks