Help - Search - Members - Calendar
Full Version: Image Padding in IE
Movable Type Community Forum > Additional Resources > Tips and Tricks
mrb712
This is a bit off-topic in that it pertains to the behavior of Internet Explorer in every instance including Movable Type, but I'm asking here because I am trying to control the behavior through Movable Type. So...

I like to show images on the blog via a link that opens the image in a new window, which is sized to the image. I have a small javascript that does exactly what I want it to do, and in Safari and Camino it works flawlessly. In IE, though it also works, it displays a window with padding on the top and left of the picture, pushing the picture down and to the right. This is the "default" behavior of IE or so I've been told. The javascript is as follows:

CODE
<a title="XXX" onclick="window.open('http://www.sitename.com/xxx.jpg','height=###,width=###');return false" href="#">link to image</a>


Is there a setting that one can add to the javascript or to the stylesheet that will prevent or compensate for this padding? Is there a more elegant way of handling this situation through MT or any other method?

I would love to hear any advice.

Thanks,
mrb
BubbleDragon
The best solution I can think of is to create a page for each image, and make the body tag like this:

CODE
<body topmargin="0" and leftmargin="0"> .... </body>


Of course, that's a severe PITA, but it's all I can come up with right now.
noelgreen
Sorry to "rant" on here, but I think the best way around it is to ignore things IE does anyway. Especially because I believe IE will be obsolete within a short amount of time. (relative time of course)

Part of my reasoning comes from articles like this one

As for alternate browsers, for Mac users there's Safari, which is way excellent... and for PC users there's Netscape, Mozilla, and FlashPeak.com (Slim Browser).

That's my 2 cents worth. smile.gif
mrb712
I agree with you Noel. Believe me, I'm a die-hard Mac user, and I hate having to conform to a Windows world sometimes, but still I try to accommodate as necessary.

In fact, your thinking has more than persuaded me to just leave it alone, Windows IE users be damned! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.