SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: iFrame Issues

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iFrame Issues

    It seems as though when I use an iFrame, it adds a couple pixels of blank space to the top of the iFrame....I have the attribute frameborder set to 0...anyone have any ideas?

  2. #2
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you set the margins for the pages which are called into the iframe to '0'?
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you referring to the <body> tag and the attributes leftmargin=0 topmargin=0 etc? I am using a style="margin:15px" but I have other content on the page besides the iFrame, so that wouldn't matter.

    Or are there specific iFrame attributes that I'm missing?

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To better illustrate the problem I'm running into, here is a screen capture:



    If you notice, I have two images; one on top and one at the bottom, inside of one cell, so they're put together with the iFrame in one cell, then another table is outside of that table with cellpadding of 1 to give the border around the edge, and that table is also what forms the rest of the page.

    The blank spaces I'm referring to are the thick dark gray lines that are of the outside table border color.

    Here is the code I'm working with:

    Code:
    <table align="center" width="700" cellpadding="1" cellspacing="0">
    	<tr>
    		<td width="550" nowrap></td>
    		<td width="150" align="right" class="border">
    			<img src="images/voiceit_top.gif" width="150" height="27" alt="voice it!" border="0">
    			<iframe bgcolor="#FFFFFF" src="voiceit/viewshoutbox.php" width="150" height="300" frameborder="0">
    			<a href="voiceit/expanded.php">View the shoutbox</a>
    			</iframe>
    			<img src="images/voiceit_bottom.gif" width="150" height="27" alt="end" border="0">
    		</td>
    	</tr>
    </table>
    Thanks to anyone who can help me.

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, a friend helped me out. As it turned out, all I had to do was remove the space from the </td> and <img> tag for the bottom space to be removed, and remove the space between the <img> tag and <iframe> tag for the top space to be removed.


Bookmarks

Posting Permissions

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