Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS :before Pilcrow sign

Tags:

css

I'm trying to add a pilcrow (¶) sign before an element. This code works in Safari only. The pilcrow appears.

.ydss-comment:before
{ 
content:"\B6\";
color:red;
font-size:1.5em;
}

If I replace the \B6\ with a letter or any text or number

content:"My Text";

The text appears correctly in FireFox, both Mac and PC, but no luck at all with IE.

Thanks for any help.

like image 284
glebski Avatar asked Oct 10 '22 09:10

glebski


1 Answers

Change the content to this:

content: '\00b6'

It seems that you have to specify the full 4 digits.

Also, about why it doesn't work in IE:

(This was in Richard's answer which was then deleted)

The :before selector was only supported recently. According to MSDN :before was only supported in IE 8.

like image 138
nickf Avatar answered Oct 13 '22 11:10

nickf