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
    Jan 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Spacing problem with tables.

    Okay, I have looked evrywhere to see whats wrong with my code.
    There is a space between the cells in my tables website layout. Can someone tell me how to fix it.

    Here is my code.

    Code:
    <html>
    <head>
    <title>//{Recycled Material}</title>
    </head>
    
    <body background="bodybg.png";>
    
    <table border="0" cellpadding="-1" cellspacing="-1" align="left" width="750" valign="top" style="position: absolute; top:-5px; left:250px;">
    <tr>
    <td align="center" valign="top" ><img src="ajordan.png" cellpadding="0" cellspacing="0" width="366" height="90"></td>
    <td align="center" valign="top" ><img src="ashane.gif" cellpadding="0" cellspacing="0" width="384" height="90"></td>
    </tr>
    <tr>
    <td align="center" valign="top"><img src="Abengi.gif" cellpadding="0" cellspacing="0" width="366" height="98"></td>
    <td align="center" valign="top"><img src="aderek.gif" cellpadding="0" cellspacing="0" width="384" height="98"</td>
    </tr>
    <tr>
    <td align="center" valign="top"><img src="abradley.gif" cellpadding="0" cellspacing="0" width="368" height="94"></td>
    <td align="center" valign="top"><img src="ajeff.gif" cellpadding="0" cellspacing="0" width="382" height="94"></td>
    </tr>
    <tr>
    <td align="center" valign="top" ><img src="abill.gif" cellpadding="0" cellspacing="0" width="368" height="84"></td>
    <td align="center" valign="top"><img src="amike.gif" cellpadding="0" cellspacing="0" width="382" height="84"></td>
    </tr>
    <tr>
    <td align="center" valign="top"><img src="ajoek.gif" cellpadding="0" cellspacing="0" width="370" height="98"></td>
    <td align="center" valign="top"><img src="adakota.gif" cellpadding="0" cellspacing="0" width="380" height="98"></td>
    </tr>
    
    
    </table>
    
    </body>
    </html>
    Here is a screen capture:
    http://i2.tinypic.com/8avxs9t.png

    As you can see there is a space between the columns. Can anyone help me get rid of that?

  • #2
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Location
    Essex, UK
    Posts
    250
    Thanks
    1
    Thanked 23 Times in 22 Posts
    Difficult to sort this without access to the url so we can see how the images fit.

    A few comments though:

    Can cellpadding/spacing take negative values?
    I always thought that cellpadding/cellspacing were properties of the table, not the individual cells.
    Some browsers put spaces in if there is white space between the image tag and enclosing tags. However, I cannot see any such here. What browser are you using?

    The whole table would be better styled with a stylesheet rather than inline attributes.

    John

  • #3
    Regular Coder
    Join Date
    Nov 2006
    Posts
    246
    Thanks
    13
    Thanked 26 Times in 24 Posts
    No, you can't have negative attributes in cellpadding and cellspacing. That maybe the problem right there, but no guarantee because I can't test it. Make both attributes 0 and see if that doesn't help. If not, give us a URL. It can make figuring out your problem much easier.

    Also, cellpadding and cellspacing cannot be used in the <img> tag.
    Last edited by Majoracle; 01-06-2008 at 12:03 PM.


  •  

    Posting Permissions

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