I have a div with height and width, and it has a background image assigned to it in the stylesheet. It works fine in Firefox/Chrome, but in IE8 and below the image just doesn’t show up. In the developer the background attribute doesn’t even show up as one of the styles. I can add background color and that does work. Does anyone know why this might be?
For reference the attribute looks something like this:
background: url("imgpath.png") no-repeat scroll 0 0 transparent;
width:20px;
height:20px;
position:relative
Edit: the HTML is just a div within a larger wrapper. Other images in the wrapper that are defined in the same way work.
Yeah, I think I know what it might be. Try to put the whole image path there including the protocol and domain, just like that:
background: url("http://example.com/imgpath/image.png") no-repeat scroll 0 0 transparent;And tell me if it works or not.