Coding⏱️ 1 min read📅 2026-05-31

How to Fix: nbsp not working in CSS content tag

CSS content property issue with non-breaking space (nbsp) not displaying correctly.

Quick Answer: The issue is due to the ampersand (&) being interpreted as an entity. Use   instead of & for a true non-breaking space.

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?

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database