PDA

Click to See Complete Forum and Search --> : Tables... ARGH!


Sastraxi
Mar 10th, 2002, 10:44 AM
Filburt you had this problem a while ago I think... in IE the tables are displaying correctly but even with no cellpadding and no cellspacing the 1px wide borders are more like 5px. And, in netscape they're like 2px but everything else is WHACK.

What am I doing wrong? <TABLE WIDTH=90% CELLPADDING=0px CELLSPACING=0px BGCOLOR=#BBBBBB ALIGN=CENTER>
<TR>
<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161>
</TD>
</TR>
<TR>
<TD WIDTH=1px BGCOLOR=#616161>
</TD>
<TD BGCOLOR=#BBDD77>
<FONT FACE="Verdana, Tahoma, Arial" SIZE=-1>
<B>News for March 10th, 2002</B><BR>
<FONT SIZE=-2>1 News Item(s)</FONT><BR>
</FONT>
</TD>
<TD WIDTH=1px BGCOLOR=#616161>
</TD>
</TR>
<TR>
<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161>
</TD>
</TR>
</TABLE>

filburt1
Mar 10th, 2002, 11:04 AM
Pfft, good ol' Nutscrape :rolleyes:

Methinks Netscape can't handle (even IE sometimes) cells with a width/height of 1; you might want to try CSS formatting instead, like style="border-left:1px solid #000000".

Sastraxi
Mar 10th, 2002, 11:17 AM
I'm one step ahead of ya there bud, thanks for that though! :D

It works like a charm...

scoutt
Mar 10th, 2002, 04:58 PM
that is because Netscape wil not render the cell if it is empty.

<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161></TD>


this will work

<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161>& nbsp;</TD>

chrisjk
Mar 10th, 2002, 05:04 PM
I guess that explains why frontpage express puts & nbsp; everywhere...to cover Nutscrape.

scoutt
Mar 10th, 2002, 05:12 PM
well that is a good thought, but I don't think so.... :)

Sastraxi
Mar 10th, 2002, 07:50 PM
Well that only further annoyed me until I put in the borders because the non-breaking space is bigger than 1 pixel wide.

scoutt
Mar 10th, 2002, 08:10 PM
if you are only having it at 1px wide, what is the purpose of the cell anyway. also you might find out that if you keep your TD tags together it will cut out a line break.

<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161>& nbsp;</TD>

not like this

<TD COLSPAN=3 WIDTH=100% HEIGHT=1px BGCOLOR=#616161>& nbsp;
</TD>

filburt1
Mar 11th, 2002, 06:00 AM
Originally posted by chrisjk
I guess that explains why frontpage express puts & nbsp; everywhere...to cover Nutscrape.

Dreamweaver does that intentionally, FrontPage does it just because it is a royal POS and feels like adding extra code :p

chrisjk
Mar 11th, 2002, 08:37 AM
notice I said Frontpage Express which IMO is far better behaved than the full frontpage

Only 1 change is needed to the code it outputs to make it HTML 4.01 compliant

FE only adds & nbsp; to <td>'s that have nothing in them

progressive
Mar 15th, 2002, 11:10 AM
To combat cellspacing problems by far the best method is to use transparent images to space empty cells and maintain the correct spacing.

TIP: try not using any width or height settings in your table cells, instead use a 1x1pix transparent image and set (stretch) that to the size you want your cell to be. by doing this you'll find that your tables look the same in all browsers !

;)

ubunreal69
Mar 16th, 2002, 10:25 AM
has anyone ever had that problem of putting a <IMG> image into a cell and it leaves a small gap below the image ??

well, did you know u could get rid of it by putting a like break under the image ??


hehe, u's probably already knew that though :rolleyes:

scoutt
Mar 16th, 2002, 10:38 AM
you can also get rid of it by having the td tags on the same line.

<td><img></td>

not like this

<td><img>
</td>

that will give it a line break.

so you get rid of the line break by adding a line break? that doesn't make since.

sail3005
Mar 16th, 2002, 01:27 PM
Originally posted by ubunreal69
has anyone ever had that problem of putting a <IMG> image into a cell and it leaves a small gap below the image ??

well, did you know u could get rid of it by putting a like break under the image ??


hehe, u's probably already knew that though :rolleyes:

Yep, i figure out that trick a while ago. It took me a while, it makes no sense.

ubunreal69
Mar 16th, 2002, 11:19 PM
Originally posted by scoutt
you can also get rid of it by having the td tags on the same line.

<td><img></td>

not like this

<td><img>
</td>

that will give it a line break.

so you get rid of the line break by adding a line break? that doesn't make since. lol, neither does the last word of that last sentence ;)

It doesnt make sense but it works, like:
<td>
<img src=""><br>
</td>

i only figured it out by mistake about 3 months ago, and i'v been coding for 3 years :D i dont think Arian knows of this trickj though cos he was having trouble with it about 2 months ago while working on the layout of his page, the one with the "Bubbles" :rolleyes: