How do you use the CSS content property to add HTML entities?
Using something like this just prints to the screen instead of the non-breaking space:
.breadcrumbs a:before {
content: ' ';
}
How do you use the CSS content property to add HTML entities?
Using something like this just prints to the screen instead of the non-breaking space:
.breadcrumbs a:before {
content: ' ';
}
You have to use the escaped unicode :
Like
.breadcrumbs a:before {
content: '\0000a0';
}
More info on : http://www.evotech.net/blog/2007/04/named-html-entities-in-numeric-order/
Use the hex code for a non-breaking space. Something like this:
.breadcrumbs a:before {
content: '>\00a0';
}
I know this is an pretty old post, but if spacing is all your after, why not simply:
.breadcrumbs a::before {
content: '>';
margin-left: 8px;
margin-right: 8px;
}
I have used this method before. It wraps perfectly fine to other lines with ">" by its side in my testing.
Here are two ways:
In HTML:
<div class="ics">⛱</div>
This will result into ⛱
In Css:
.ics::before {content: "\9969;"}
with HTML code <div class="ics"></div>
This also results in ⛱