PROBLEM: Images have spaces between table cells

Discussion in 'HTML' started by jcnews at earthlink.net, Nov 25, 2004.

  1. I am working on a website. I cut an image into two sections to accomodate
    the layout. At first everything was fine, but after doing some other
    improvements, the two parts of the image are now separated from each other
    in Internet Explorer 6 (it works fine in Firefox and Opera).

    I can try to sketch out the layout here. The "*"s are the top part of the
    image, and the "+"s are the bottom part of the same image, both within their
    own table cells. IE 6 and NS 4 leave a gap between the images.

    ****************
    ****************
    ****************
    ++++++ Main Content Here
    ++++++
    ++++++
    ++++++


    This is some of the problem code (it is a new version coded by hand in an
    attempt to find the problem -- all content has been removed). I don't want
    the two parts of my image to have a space between them. I tried adding
    border="0" to the images, to put   in all empty table cells, taking
    away the specific measurements for cells... nothing has worked with IE. It
    DID work originally in IE when I assembled the page in Dreamweaver MX, but
    something that I did later broke it, and now I cannot get it back even by
    hand-coding. Any help would be greatly appreciated!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Title goes here</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>

    <body>

    <table cellpadding="0" cellspacing="0" border="0">

    <!--1st row-->
    <tr>
    <td width="450" height="198" colspan="2">
    <img src="images-top.jpg" width="450" height="198" border="0"/>
    </td>
    <td>&nbsp;

    </td>
    <td>&nbsp;

    </td>
    <td>&nbsp;

    </td>
    </tr>

    <!--2nd row -->
    <tr>
    <td width="209" height="163" valign="top">
    <img src="images2.jpg" width="209" height="163" border="0" />
    </td>

    <!--Content cell-->
    <td colspan="3" rowspan="2">
    <p>Content goes here</p>
    </td>

    <td>&nbsp;

    </td>

    </tr>


    <!--3rd Row-->
    <tr>
    <td>&nbsp;

    </td>
    <td>&nbsp;

    </td>
    </tr>

    <!--4th row-->
    <tr>
    <td>&nbsp;

    </td>
    <td>
    <p>Content goes here</p>
    </td>
    <td colspan="2" width="358" height="178">
    <img src="image-footer.jpg" />
    </td>
    </tr>
    </table>
    </body>
    </html>
     
    jcnews at earthlink.net, Nov 25, 2004
    #1
    1. Advertising

  2. jcnews at earthlink.net

    Mark Parnell Guest

    Previously in alt.html, "jcnews at earthlink.net" <>
    said:

    > I am working on a website. I cut an image into two sections to accomodate
    > the layout.


    Then fix your layout.

    > At first everything was fine, but after doing some other
    > improvements, the two parts of the image are now separated from each other
    > in Internet Explorer 6 (it works fine in Firefox and Opera).


    Doesn't sound like an improvement to me. ;-)

    > I can try to sketch out the layout here. The "*"s are the top part of the
    > image, and the "+"s are the bottom part of the same image, both within their
    > own table cells.


    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    > IE 6 and NS 4 leave a gap between the images.


    Don't worry about NS4. Its market share is negligible and falling.

    > This is some of the problem code

    <snip>

    Don't post code, post a URL.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Nov 25, 2004
    #2
    1. Advertising

  3. jcnews at earthlink.net

    rf Guest

    jcnews at earthlink.net wrote:

    > At first everything was fine, but after doing some other
    > improvements, the two parts of the image are now separated from each other


    So, it was working until you put some content into it.

    > This is some of the problem code (it is a new version coded by hand in an
    > attempt to find the problem -- all content has been removed).


    Now, you provide an example where all the content has been removed.

    Also you want me to copy/paste this into an editor and then show it to my
    browser.

    Do you really think this will reproduce your problem?

    Probably not :)

    Please provide a URL to the site that actually has the problem.

    --
    Cheers
    Richard.
     
    rf, Nov 25, 2004
    #3
  4. jcnews at earthlink.net

    Duende Guest

    While sitting in a puddle jcnews at earthlink.net scribbled in the mud:

    > <table cellpadding="0" cellspacing="0" border="0">
    >
    > <!--1st row-->
    > <tr>
    > <td width="450" height="198" colspan="2">
    > <img src="images-top.jpg" width="450" height="198" border="0"/>
    > </td>
    > <td>&nbsp;
    >
    > </td>
    > <td>&nbsp;
    >
    > </td>
    > <td>&nbsp;
    >
    > </td>
    > </tr>
    >
    > <!--2nd row -->
    > <tr>
    > <td width="209" height="163" valign="top">
    > <img src="images2.jpg" width="209" height="163" border="0" />
    > </td>
    >


    Your code leaves white space.
    Should be
    <tr><td><img---></td><td>&nbsp;</td><td>&nbsp;</td></tr>
    <tr><td><img---></td><td>&nbsp;</td><td>&nbsp;</td></tr>

    leaves no white space

    --
    Duende (irregular)
    Friends help you move.
    Real friends help you move bodies.
     
    Duende, Nov 25, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Gilbert
    Replies:
    0
    Views:
    932
    Carl Gilbert
    Jul 20, 2005
  2. Dave \IT\

    Spaces Between Images in Table

    Dave \IT\, Apr 22, 2004, in forum: HTML
    Replies:
    2
    Views:
    417
    Mitja
    Apr 22, 2004
  3. MrC

    Images in Table Cells

    MrC, Oct 5, 2004, in forum: HTML
    Replies:
    3
    Views:
    862
    Dan Abrey
    Oct 6, 2004
  4. UJ
    Replies:
    8
    Views:
    61,739
  5. Cal Who
    Replies:
    4
    Views:
    416
    Cal Who
    May 17, 2010
Loading...

Share This Page