0

I used li:after to add content after the li element, but it didn't work. I tried to solve the problem with nav ol li::after, nav ol li*::after, but it didn't work.

Image Reference

Here's the code I used:

nav ol li::after {
  content: "|";
}

nav ol li:last-child {
  content: "";
}
Bruno Mazza
  • 555
  • 1
  • 8
  • 23

1 Answers1

0

Besides having extra spaces. You also need to combine the css pseudo-elements. It should be li:last-child::after and li::after.

Check the fiddle

Diogo Almiro
  • 333
  • 3
  • 14