nbsp not working in CSS content tag

Css

Css Problem Overview


> Possible Duplicate:
> Adding HTML entities using CSS content

#sitenavmenu-content-menu li:before
{
    content:"|  ";
}

I want to add a | and two spaces before each list item. However, for some reason it prints the word nbsp and not the space. Any ideas?

Css Solutions


Solution 1 - Css

This could be the answer you are looking for :

content: "|\00a0\00a0";

Solution 2 - Css

Fixed it by copying and pasting the non-breaking space from character map into my code editor.

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
QuestionNibblyPigView Question on Stackoverflow
Solution 1 - CssagacodeView Answer on Stackoverflow
Solution 2 - CssNibblyPigView Answer on Stackoverflow