Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 21, 2016 03:02 pm GMT

Style List Markers in CSS

It's a perfectly reasonable to want to style the marker of list items. You know: blue bullets with black text in an unordered list. Or red counters with knockout white numbers in an ordered list.

There is a working draft spec that defines a ::marker pseudo-element that would give us this control.

/* Not supported anywhere; subject to change */
li::marker {
color: blue;
}

It's possible to do this styling now, though, thanks to CSS counters. The trick is …


Style List Markers in CSS is a post from CSS-Tricks


Original Link: https://css-tricks.com/style-list-markers-css/

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