neolivz4ever neolivz4ever - 4 months ago 36
CSS Question

CSS content not working for some cases

I am trying to incorporate CSS before content.
I want to put info icon (i), which is "\e608"

#securityCodeLink:before {
content: "\e608";
}


The output looks like this

e608

But if i try with 2701 or something like that

#securityCodeLink:before {
content: "\2701";
}


It works perfectly fine.

2701

Can any one tell me why is this and how can i fix this?

Answer

The icon will only appear if you're using a font which supports it.

On StackOverflow (which uses a font-family of Arial, 'Liberation Sans', 'DejaVu Sans'):

\e608 renders as 

\2701 renders as ઍ

Comments