Non-breaking space ( ) in :before and :after content
Non-breaking space ( ) in :before and :after pseudo-elements. Hex code ( \00a0 ) is used in the content property instead of the named character entity ( ):
ABC
HTML code:
<p>ABC</p>
CSS code:
p:before {content:"\00a0";}
p:after {content:"\00a0";}
Browser support
- Windows
- Internet Explorer 8.0+
- Firefox 1.0+
- Google Chrome
- Opera 6.0+
- Safari 3.1+
- SeaMonkey 1.0+
- Mozilla 0.6+
- Netscape 6.01+
- Linux
- Firefox 1.0+
- Google Chrome / Chromium
- Opera 6.0+
- SeaMonkey 1.0+
- Hv3
- Mozilla 0.6+
- Netscape 6.01+