Kheema Pandey
Kheema Pandey

Reputation: 10265

using background image in :after Pseudo class

I need to show a icon after the H3 tag, Below is the code I am using. But its not working;

h3:after{
content: "";
background: url(down-arrow.png) no-repeat 0 0;
width:24px;
height:24px;
color:#666666;}.

Upvotes: 4

Views: 9638

Answers (1)

Domenic
Domenic

Reputation: 112857

You need display: block or display: inline-block as well.

Working example: http://jsfiddle.net/wH7gp/

Upvotes: 13

Related Questions