Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,788
    Thanks
    8
    Thanked 131 Times in 129 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •