Reputation: 1643
I have this simple css code that works on chrome, but not on internet explorer and firefox, what am i missing?
.removeIcon{
content: url(../images/remove.png) no-repeat;
display: inline-block;
width: 25px;
height: 25px;
margin-left:5px;
cursor: pointer;
margin-top:9px;
}
What is the cause of this and how do i fix it?
Upvotes: 0
Views: 81
Reputation: 1844
You probably want to be using the background property rather than the content property.
.removeIcon{
background: url(../images/remove.png) no-repeat;
display: inline-block;
width: 25px;
height: 25px;
margin-left:5px;
cursor: pointer;
margin-top:9px;
}
The content property is only for creating generated content on :before and :after pseudo elements, it doesn't quite work in the way you're using it. See http://css-tricks.com/css-content/
Upvotes: 2