Page 1 of 1
Scaling of thumbnails in IE7
Posted: Wed Jan 09, 2008 5:10 pm
by schimanke
When I post a new entry to my
blog I usually add a small thumbnail graphic at the top left corner. So far so good. But when I take a look at the blog with IE7, it sometimes scales the thumbnails. Example: The thumbnail should be 110x110px but IE/ displays it as 140x110px. Everything works fine on Firefox and Safari. And sometimes it even does on IE7. I cannot reproduce the problem. It just appears sometimes.
Here how an entry should look like:
And here how IE7 sometimes displays it:
Has anybody out there similar problems? Is there any way to fix this issue?
I am currently using Serendipity 1.2.1 on PHP 4.4.7 with a slightly modified Andreas08 s9y v2.0 template by Carl Galloway and Andreas Viklund. The problem appeared before I modified the template.
Posted: Wed Jan 09, 2008 6:05 pm
by Don Chambers
Earlier versions of IE had difficulty displaying png images with transparency... but all that was supposedly fixed in ie7. I just checked your site with ie6 and the image looks fine (the transparent portions are light grey, which is normal for ie6).
This is a very wild guess, but you could try replacing your left and right padding with margin.... but like I said, this is a guess.
Posted: Sat Jan 12, 2008 3:29 am
by schimanke
Thanks a lot Don! Believe it or not, but replacing padding with margin worked perfectly. Maybe there is a way to fix this automatically with an upcoming version of Serendipity?!
Posted: Sat Jan 12, 2008 4:52 am
by Don Chambers
Great news!!! I'm not surprised it worked. I think the media library image insertion code should have always used margin, and not padding... but I don't know every single browser/version/platform combination, so cannot be absolutely sure the margin is ALWAYS a better option than padding (though, I suspect it is).
Anyone else reading this thread see a reason why we should NOT change the code to use margin instead of padding for v1.3? If we want an image to be distanced from surrounding elements, margins (more of an "exterior" separation) make a heck of a lot more sense to me personally than padding, which is really "interior".
Posted: Sun Jan 13, 2008 1:38 am
by schimanke
I found out something about the affected images that could be interesting for our problem. When I right-click on the images that are scaled by IE7 (for example the Starbucks logo above) to see details about it, the URL of the selected image is displayed as
http://www.schimanke.com/templates/defa ... /blank.gif which is definately not what it should be.
For the images that are not scaled I receive the right URL... Any idea why?
Again, it only happens with IE. Firefox and Safari work perfectly!
Posted: Tue Jan 15, 2008 4:29 pm
by garvinhicking
Hi Schimanke!
This happens if the "serendipity_event_browsercompatibility" plugin is enabled and overlyays the PNG images to a blank gif thing via a .htc behaviour file. You can remove the plugin, or use the upcoming serendipity 1.3 plugin version, which disables that behaviour for IE7.
HTH,
Garvin