Copyright Symbol in CSS :after Pseudo-Element

HtmlCssPseudo Element

Html Problem Overview


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?

Html Solutions


Solution 1 - Html

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/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionjstm88View Question on Stackoverflow
Solution 1 - HtmlSpudleyView Answer on Stackoverflow