code_junkie

Adding HTML entities using CSS content

Nov 11th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <div class="breadcrumbs">
  2. <a>One</a>
  3. <a>Two</a>
  4. <a>Three</a>
  5. </div>
  6.  
  7. .breadcrumbs a:before {
  8. content: '> ';
  9. }
  10.  
  11. .breadcrumbs a:before {
  12. content: '>&nbsp;';
  13. }
  14.  
  15. .breadcrumbs a:before {
  16. content: '>000a0';
  17. }
  18.  
  19. .breadcrumbs a:before {
  20. content: '>0a0';
  21. }
  22.  
  23. content:'>000a0'; /* because you'll find: */
  24. content:'No000a0Break'; /* becomes No&nbsp;Break as opposed to below */
  25.  
  26. content:'No0a0Break' /* becomes No&#2571;reak */
  27.  
  28. .breadcrumbs a:before { content: '>'; padding-right: .5em; }
Add Comment
Please, Sign In to add comment