Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using background image in :after Pseudo class

Tags:

css

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;}.
like image 812
Kheema Pandey Avatar asked Dec 13 '22 06:12

Kheema Pandey


1 Answers

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

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

like image 67
Domenic Avatar answered Dec 30 '22 16:12

Domenic