Scaling of thumbnails in IE7

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Scaling of thumbnails in IE7

Post 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:
Image

And here how IE7 sometimes displays it:
Image

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.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Post 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?!
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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".
=Don=
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply