Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-06-2008, 03:37 AM   PM User | #1
Sendoku
New to the CF scene

 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Sendoku is an unknown quantity at this point
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?
Sendoku is offline   Reply With Quote
Old 01-06-2008, 10:34 AM   PM User | #2
Actinia
Regular Coder

 
Actinia's Avatar
 
Join Date: Feb 2007
Location: Essex, UK
Posts: 250
Thanks: 1
Thanked 23 Times in 22 Posts
Actinia is on a distinguished road
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
Actinia is offline   Reply With Quote
Old 01-06-2008, 11:58 AM   PM User | #3
Majoracle
Regular Coder

 
Join Date: Nov 2006
Posts: 246
Thanks: 13
Thanked 26 Times in 24 Posts
Majoracle is an unknown quantity at this point
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..
Majoracle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:17 AM.


Advertisement
Log in to turn off these ads.