Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: incrediBILL
With IE6, the images on my site are displaying with incorrect aspect ratios when the pages are first loaded.
Some images are rendering too tall and others too wide. They appear to be rendering square.
When I navigate away from the page and come back to it, the images are rendered correctly - except for the largest page - which seems to require a couple more tries before all of the pictures are rendering correctly.
None of the images in question are in divs of restricted sizes. They are also being loaded at their actual sizes (except for a couple that are a couple of px different - not enough to make a difference).
I had the same problem in the page header and also had some of the header background div showing below the pictures. I found this message:
and when I fixed the margin problem by using display: block; for the header images, they rendered correctly also.
Do I have to use display: block; on ALL the images in order for them to render with the correct aspect ratios first try? Or is there some other fix.
Thanks in advance for all replies
no such luck. Although they are correct on my DD's IE6.0.2900, my header background image is still hanging below the pictures on browershots.org
I have just learned that I cannot post links to the site in question so I will post some sample code instead. Apologies for violating the forum rules by posting a link.
[edited by: CDNQuilter at 1:34 am (utc) on Oct. 17, 2006]
<img src="my.gif" width="100" height="100" alt="">
<img src="my.gif" style="width: 100px; height: 100px;" alt="">
(Note: units are important in CSS)
Do I have to use display: block; on ALL the images in order for them to render with the correct aspect ratios first try?
No, you should not have to set
display:block;in order to get your images displaying at the correct aspect ratio, but I think you've realised that already. That, I think, is an unrelated issue.
However, it is a very good idea to set the image dimensions explicitly, if you are not doing already, as Suzy suggests.