SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Leeds
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image Gap Problem

    Ok i've just started making a simple Nav Bar i HTML. Using an IMG then a table making up one image. Site works fine in IE6 and NS 7, but in IE 5 mysterous gaps appear at either side of the image.

    Table has no border, padding etc, neithre does img.

    Searched Forum and tried several things including: removing DOCTYPE, removing whitespaces in html, img overflow hidden etc. Is it something to do with the align? Or am I missing something obvious?

    Heres the code:
    <img src="images/web/logo.gif" height="194" width="226" align="left"><table width="100%" height="193" border="0" cellspacing="0" cellpadding="0" align="left">
    <tr>
    <td height="1"><img src="images/web/black.gif" height="1" width="100%"></td>
    </tr>
    <tr>
    <td width="60%" height="16" background="images/web/small_orange.gif"></td>
    </tr>
    <tr>
    <td height="1"><img src="images/web/black.gif" height="1" width="100%"></td>
    </tr>
    <tr>
    <td height="125" background="images/web/blue.jpg">
    <img src="images/web/spacer.gif" width="1" height="34">
    <img src="images/web/logotxt.gif" width="326" height="49" align="left"> </td>
    </tr>
    <tr>
    <td height="1"><img src="images/web/black.gif" height="1" width="100%"></td>
    </tr>
    <tr>
    <td height="49" background="images/web/orange.gif"></td>
    </tr>
    <tr>
    <td height="1"><img src="images/web/black.gif" height="1" width="100%"></td>
    </tr>
    </table>


    Please help me, Many Thanks

  2. #2
    Forums Designer
    Join Date
    Jun 2004
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <td height="125" background="images/web/blue.jpg">
    <img src="images/web/spacer.gif" width="1" height="34">
    <img src="images/web/logotxt.gif" width="326" height="49" align="left"> </td>
    remove spacing between <td> and <img> in that code so it would look like this:
    Code:
    <td height="125" background="images/web/blue.jpg"><img src="images/web/spacer.gif" width="1" height="34"><img src="images/web/logotxt.gif" width="326" height="49" align="left"></td>

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Leeds
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help but I've still got the problem. The gap lies between the first img and the table. There is also a gap from the edge of the browser to the image. Basically it looks like theres some kind of border to the left and right of the img bu not the top and bottom?!

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Leeds
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've solved the problem, quite simple really. I needed to set the image vspace to 0, also set the hspace to 0 just incase. I assume that IE 5.5 automatically renders imgs with a vspace of about 2. So if someone out there has a similar problme try this!


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
  •