Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS *:before, *:after { content: ‘ ‘ } Re: *:before, *:after { content: ‘ ‘ }

#123128
Andy Howells
Participant

I use before/after from time to time to add custom characters to elements. Usually it will be on a list-item, for example a check mark like below;

li:before { content: “✔ “; }

90% of the time I’m using before/after to do stlying that requires a fake element. and thus have empty “content”. However as @paulie_D said, don’t use the universal selector, that way madness lies.