Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML special characters in CSS "content" attribute

I'm trying to add content to something before an item using the CSS :before + content: fields. I want to insert a checkmark (☑), BUT if I use that in the content option, it prints as the literal. How can I tell CSS to make that a checkmark, not the literal string ☑?

like image 834
sethvargo Avatar asked Dec 18 '10 02:12

sethvargo


1 Answers

Try this:

#target:before {
  content: "\2611";
}
like image 53
Flack Avatar answered Oct 10 '22 10:10

Flack