• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4253 shaares
Filters

Creative list styling

QRCode

A look at some useful and creative ways to style a list.

Custom markers with ::before #
Styling the ::before pseudo-element was a common way to create custom list markers before ::marker came along. But even now, it can allow us more flexibility, when we need it, for visually complex list styling.

Like ::marker, we can add our own custom bullet styles using the content attribute. Unlike using ::marker, we need to do some manual positioning, as we don't get the automatic benefits offered by list-style-position. But we can position it relatively easily with flexbox, and it does open up a greater number of possibilities for alignment. For instance, we could alternate the position of the marker:

https://web.dev/creative-list-styling/
September 16, 2022 at 2:40:20 PM EDT *
webdesign css
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community