Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using HTML in CSS After Tag for Hover State

I am currently trying to pass in some html into the the :after pseudo class in css to add an arrow after a link once hovered on. I have seen this done quite some time ago in the stock WordPress theme that used to ship with the default install. I feel like I must me missing something simple.

a:hover:after{content: "»"}  

thank in advance!

like image 411
jeffreynolte Avatar asked Mar 07 '11 23:03

jeffreynolte


2 Answers

You need to use the hex value \00BB.

http://jsfiddle.net/durilai/AGDbH/

like image 170
Dustin Laine Avatar answered Sep 21 '22 01:09

Dustin Laine


You're looking for, I think:

a:hover:after
{
content: "\00bb";
}

JS Fiddle demo

Link to reference: http://css-tricks.com/snippets/html/glyphs/

like image 28
David Thomas Avatar answered Sep 18 '22 01:09

David Thomas