Copyright Symbol in CSS :after Pseudo-Element

Justin Mrkva picture Justin Mrkva · Oct 14, 2011 · Viewed 68.4k times · Source

SOLVED - used \00a9 instead of ©

Pretty self-explanatory:

body:after {
    content: "© me";
    /* other formatting */
}

In HTML, the © sequence inserts a copyright character. Can this be done in CSS Pseudo-Elements like I'm trying to do here?

Answer

Spudley picture Spudley · Oct 14, 2011

CSS doesn't use HTML's entities; it uses its own unicode escape sequences.

You need to use \00a9 for the copyright symbol.

body:after {
  content:"\00a9 me";
}

See here for a cheat-sheet table which shows just about every entity/unicode string you'd ever need: http://www.evotech.net/blog/2007/04/named-html-entities-in-numeric-order/