...

View Full Version : Image Load in Iframe Without Whitespace?



matto
12-11-2007, 11:19 PM
I'm working on two versions of an image gallery. The simpler version features a page of thumbnails with an iframe at the bottom. The links are targeted to the iframe and everything works well.

The only problem I have is that I keep having to increase my frame size because IE displays a large amount of whitespace around the image within the frame. I am currently loading each picture directly into the frame; the default source for the frame is an empty page with a white background, to blend in with the rest of my site.

I know I could make a quickie page for each image I want to load and control the margin/padding that way, but it seems extremely tedious. Is there something I'm missing? I've already tried setting the margin and padding to 0 in the style for the iframe, but that doesn't have any effect.

harbingerOTV
12-11-2007, 11:32 PM
Without seeing your code there are a few things you could try. Witht the iframe you could (if using some server side scripting is allowed) pass a variable on click to one page being loaded into the frame. basically create one page with all the imags on it that calls each image depending on the variable passed. That way you can just edit the one page for the images and the links hittig said page and then turn the default padding & margin to 0.

or you could go a full css route and have the images apear on hover ia a specified spot.

or you could use javascript.

the latter two avoiding the iframe all together.

matto
12-11-2007, 11:44 PM
Without seeing your code there are a few things you could try. Witht the iframe you could (if using some server side scripting is allowed) pass a variable on click to one page being loaded into the frame. basically create one page with all the imags on it that calls each image depending on the variable passed. That way you can just edit the one page for the images and the links hittig said page and then turn the default padding & margin to 0.

The site is hosted on geocities (not my choice) so, to my knowledge, I'm limited by what I can upload directly into the filespace.


or you could go a full css route and have the images apear on hover ia a specified spot.

or you could use javascript.

the latter two avoiding the iframe all together.

The hovering won't work because some of the images are too large. I think scrolling to see them would move you off the hover point and lose the image. Maybe? I'm not sure now.

And javascript is the other way I was trying to go; I have a question in the java forums already.

I didn't think posting the code would really be helpful because it's so simple. Here's a sample though:


<a href="furn8.jpg" target="win" class="icon">
<img src="furn8_ico.jpg">
</a>

<iframe src="../win.html" style="width: 600; height: 490;" frameborder="0" name="win">
&nbsp;
</iframe>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum