Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 4
    Should be a space after the colon. Commented Apr 29, 2010 at 23:17
  • 7
    Initial tests indicate the content-property works well. Congrats on finding an answer when everyone else says it can't be done. :)
    – abelenky
    Commented Apr 29, 2010 at 23:18
  • 8
    To cover older IE, you can conditionally include code.google.com/p/ie7-js which will allow your CSS to remain the same for all browsers. It's an alternative to jQuery that is closer to standards. Commented Apr 29, 2010 at 23:22
  • 28
    Why would you rather recommend using Javascript?
    – Rikki
    Commented Nov 12, 2013 at 15:07
  • 2
    Interesting: seems to work with one or two colons, e.g. .OwnerJoe:before and .OwnerJoe::before
    – MmmHmm
    Commented May 29, 2017 at 16:47