Reputation: 1803
I'm trying to use a css file which contains the black down pointing triangle. In windows it works fine, but as soon as I copy the file to a Linux server the symbol becomes garbage.
How would I use this symbol in a css file on Linux.
content: '.';
where the dot should be the symbol.
I've tried:
content: ▼
content: '▼';
which is supposed to be the value for the symbol but I'm guessing wrong as it doesnt work.
Upvotes: 0
Views: 6076
Reputation: 545608
Your second attempt is trying to use HTML entities in CSS – obviously that doesn’t work. You can use an escaped character instead:
content: '\25BC';
(It must be in hexadecimal.)
However, you can (and should) simply use the character “▼” directly – you just need to save and open your file using the same, agreed on encoding. You fail to do so, and as a consequence the symbol is garbled. The best encoding to use is UTF-8, which is the agreed-on default encoding on the web, on Linux and for many other applications. However, some Windows editors still need to be told to please use this encoding manually.
Upvotes: 10