Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-11-2007, 11:19 PM   PM User | #1
matto
New to the CF scene

 
Join Date: Dec 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
matto is an unknown quantity at this point
Image Load in Iframe Without Whitespace?

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.
matto is offline   Reply With Quote
Old 12-11-2007, 11:32 PM   PM User | #2
harbingerOTV
Senior Coder

 
Join Date: Jan 2005
Location: Memphis, TN
Posts: 1,765
Thanks: 8
Thanked 123 Times in 121 Posts
harbingerOTV will become famous soon enough
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.
__________________
Stop making things so hard on yourself.
i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis
harbingerOTV is offline   Reply With Quote
Old 12-11-2007, 11:44 PM   PM User | #3
matto
New to the CF scene

 
Join Date: Dec 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
matto is an unknown quantity at this point
Quote:
Originally Posted by harbingerOTV View Post
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.

Quote:
Originally Posted by harbingerOTV View Post
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:

Code:
<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>
matto is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:24 AM.


Advertisement
Log in to turn off these ads.