I have the CSS:
.dot-preview {
background: url("../images/dot.png") no-repeat scroll 0 0 transparent;
}
but IE 7/8/9 don’t show the image.
Called from:
<img class="dot-preview">
What is wrong with my code? It is IE bug?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assigning background to empty image tag makes very little sense. Use
<div>element instead and the key is to give it proper width and height:And in the CSS:
Put the correct image width and height and it should work fine.