开发者

CSS Image not being displayed in Explorer

I have a page that is generated by ajax/jquery at http://chainery.comoj.com/test.html. That page is the html generated by http://chainery.comoj.com#anklets. The problem is the product image is not being displayed. I think my problem lies in the css as neither the ajax page nor the html page show the image to the left of the product description. The link and image appear to be there in explorer's dom but just no开发者_开发百科t showing. Everything does show in FF and safari. Also IE is not displaying any errors, that I can see.

Thank you for any tips or solutions, Todd


This is a pretty unique issue, but I think I know what the cause is.

If you look at the generated source on your page, the img tag that you're having issues with reads exactly like this:

<img class="itempic" src="images/products/anklets/thumbnails/SSA-40_thumb.jpg" alt="Ravina - Ravina - A hana-gusari anklet" title="Click image for larger view" height="" width="">

If you look at that you'll notice that the height and width attributes are both set to an empty string (""). I'm guessing that Firefox is generously ignoring those attributes and IE is cruelly applying them. Meaning that in IE the height and width of your image are 0, since that's the closest numerical value that IE can derive from "".

Try changing whatever it is in your script that creates that tag to either set a height and width that is appropriate, or to not add those attributes at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜