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
  • 675
  • 1
  • 10
  • 24

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
  • 363
  • 3
  • 15