Simon
Simon

Reputation: 23149

css: background-image for tag img doesn't work in IE

i have the following script

css:
img
{
    background-image:url("man.png");
    background-repeat:no-repeat;
    padding-top:6px;
    padding-bottom:60px;
    padding-left:10px;
    padding-right:10px;
    margin-right:5px;
    border: 0;

}

it works fine in all browsers, but in IE doesn't. could you tall me why? thanks

Upvotes: 2

Views: 1404

Answers (1)

Ron DeVera
Ron DeVera

Reputation: 14644

When applying a background image to an <img> tag, add display: block; to your CSS.

Upvotes: 4

Related Questions