Click to See Complete Forum and Search --> : Netscape Table Woes


Geat
02-07-2003, 04:28 AM
The Scenario:

A table in NS 4.7 with a background colour and cell spacing of 3. Some cells are deliberately left blank.

The problem: The 3 pixel space between the cells and any empty cells are rendered with the background colour of the document, not the table.

The solution: Anybody know?

Stefan
02-07-2003, 04:41 AM
Originally posted by Geat
The solution: Anybody know?

A visit to www.netscape.com to download a browser created this millenium.

Geat
02-07-2003, 04:46 AM
Yeah mate - I wouldn't touch Netscape if I didn't have to - but I work for a company that has to support it's clients, which includes having to support Netscape 4.7+

jpmoriarty
02-07-2003, 05:31 AM
One of the reasonst that they bring out new versions of browsers, is to fix errors. Therefore, unless you want to design custom pages that "work around" errors in each and every one of the browsers, you're going to have to either put up with the display issues, or as stefan suggests, download the updated browsers. They're free after all!

Geat
02-07-2003, 05:34 AM
It's gonna have to be workarounds. We develop web pages that are going to be used by schools and the general public - and for various reasons a certain percentage of this audience will not have, or won't want to get, the latest versions of browsers...

meow
02-07-2003, 05:35 AM
The problem: The 3 pixel space between the cells and any empty cells are rendered with the background colour of the document, not the table.

Uhm, are you sure that the cellspacing doesn't have the page's background color _everywhere_ because that's how it usually works.

Geat
02-07-2003, 05:39 AM
In IE the entire rectangle that the table encompasses is coloured the background colour of the table - as I wish.

I netscape, only cells with data are coloured the table's bgcolour, everything else is white.

I'm not stupid mate.

meow
02-07-2003, 05:50 AM
I was referring to Netscape 4.x. You said:
The 3 pixel space between the cells and any empty cells are rendered
I suggested that's the way Netscape 4 color cellspacing, empty cells or not.

If you want a solution, just place the whole table in another table with the bgcolor you want. :confused:

Geat
02-07-2003, 05:55 AM
Right okay, sorry - I should have worded it differently:

The 3 pixel space between the cells is white. Any empty cells are white.

That's what I meant.

Okay, I guess I'll just shove it in another table, although this ain't that elegant...

meow
02-07-2003, 05:55 AM
only cells with data are coloured the table's bgcolour, everything else is white

That another matter. Especially if you are playing with Netscape 4 you shouldn't leave any cells empty.

pyro
02-07-2003, 07:37 AM
In Netscape 4.x I believe that empty table cells are not renderd. Simply add a &-nbsp to your cell, and you should be good. (Obviously minus the -...it's there because the forums turn &-nbsp into....a blank space. :D)

Geat
02-07-2003, 07:44 AM
That's cool, but it doesn't alleviate the fact that the spaces between the cells don't get coloured...

I just want too much.

pyro
02-07-2003, 07:50 AM
Well, how about using meow's suggestion?

Originally posted by meow
If you want a solution, just place the whole table in another table with the bgcolor you want. :confused:

Geat
02-07-2003, 07:56 AM
That's what I have done, but I'd have thought that netscape would have some attribute you could set to avoid the gaps.

pyro
02-07-2003, 07:58 AM
I'm not too familiar with Netscape 4.x any more. It's been a long time.... It may have an attribute to do that for you, I don't remember right off the top of my head.

Geat
02-07-2003, 08:00 AM
No worries - thanks for your help guys.

Stefan
02-07-2003, 09:38 AM
Sadly I don't got any workaround for the 3px bug in NS 4 either.
So I'm afraid you have to use some perverted solution like a table in a table :(

The only other option I see is to leave it semibroken (working but a bit ugly) and hope that it will sooner or later make your customers upgrade from NS 4 to eg NS 7. Of cource you might not be in the position use that option. :(

Geat
02-07-2003, 09:45 AM
Unfortunately not an option, so it's gonna have to be table-in-table.

Just one thing - the correct expression is "I haven't got", not "I don't got". Please stop perverting my language.

Thanks!

pyro
02-07-2003, 09:51 AM
Originally posted by Geat
Just one thing - the correct expression is "I haven't got", not "I don't got". Please stop perverting my language.That was probably unnecessary.

Here's a quote from you

Originally posted by Geat
Okay, I guess I'll just shove it in another table, although this ain't that elegant...Ain't shoud be isn't.

meow
02-07-2003, 09:52 AM
Originally posted by Geat
That's what I have done, but I'd have thought that netscape would have some attribute you could set to avoid the gaps.

It has. :rolleyes:
cellspacing="0"

Geat
02-07-2003, 10:01 AM
Originally posted by pyro
Ain't shoud be isn't.

Ain't is accepted as a colloquialism in the English language to mean "is not". "Don't got" is a horribly constructed piece of language...

pyro
02-07-2003, 10:17 AM
Ain't is actually defined as substandard or dialect. This is a quote from The World Book Dictionary

Careful speakers and writers do not use ain't, because its use even in informal English is subject to sharp criticism,...It is almost never employed by cultivated speakers except as a deliberate illiteracy...the prevailing practice of writers and speakers is to avoid it

Geat
02-07-2003, 10:25 AM
Yeah, but World Book is an American company (Chicago of all places), so I don't think they'll have experienced as much correct English as someone that's lived in England all their life.

Going back to the original statement - "don't got" is not acceptable English. "Ain't" is...

meow
02-07-2003, 10:30 AM
cellspacing="0"

pyro
02-07-2003, 10:31 AM
Originally posted by Geat
so I don't think they'll have experienced as much correct English as someone that's lived in England all their life.Your funny. :D

Geat
02-07-2003, 10:33 AM
Originally posted by meow
cellspacing="0"

I did hear you, no need to get catty. I don't want cell spacing of 0, okay?

Stefan
02-07-2003, 10:37 AM
Originally posted by Geat
Please stop perverting my language.


It's OK by me if we continue in my native language, Swedish. If you want that just say so :D

Geat
02-07-2003, 10:40 AM
:D

meow
02-07-2003, 11:12 AM
Det var som fan! :D

Stefan
02-07-2003, 11:19 AM
Originally posted by meow
Det var som fan! :D

Världen e liten :D

meow
02-07-2003, 11:26 AM
Say what? :confused:

gil davis
02-07-2003, 02:30 PM
Originally posted by Geat
The problem: The 3 pixel space between the cells and any empty cells are rendered with the background colour of the document, not the table.Sorry, I've been asleep. Must have been the Swedish lessons.

Can you post a minimal example that exhibits your problem? I'll give it a go.

meow
02-07-2003, 02:38 PM
<table bgcolor="#ff0000" cellpspacing="4">
<tr>
<td>
Yadda
</td><td>
Yadda
</td></tr></table>

gil davis
02-07-2003, 05:35 PM
meow, I was expecting an answer from Geat. After all, it is *his* problem.

Regardless, here is a workaround that makes NS look like IE:

<head>
<script>
function init() {
if (document.layers)
{document.i1.clip.height -= 16;}
}
</script>
</head>
<body onload="init()">
<ilayer name="i1" bgcolor="lightgreen">
<table border=10 cellspacing=3 bgcolor="lightgreen">
<tr><td>1234</td><td>5678</td><td>9012</td></tr>
<tr><td>3456</td><td>7890</td><td>1234</td></tr>
<tr><td>5678</td><td>&nbsp;</td><td></td></tr>
</table>
</ilayer>
</body>

Nedals
02-07-2003, 06:03 PM
One solution I didn't see was to use cellpadding=2 instead of cellspacing=3. This will, of course, give you an effect cellspacing=4 if you can live with that.

gil davis
02-08-2003, 06:55 AM
Originally posted by nedals
use cellpadding=2 instead of cellspacing=3.Cellpadding increases the margin between the inner border and the content. Cellspacing increases the size of the inner borders. It's not the same thing.

Nedals
02-08-2003, 05:14 PM
Originally posted by gil davis
Cellpadding increases the margin between the inner border and the content. Cellspacing increases the size of the inner borders. It's not the same thing.
Gil, I know they are not the same but these 2 tables are similar (not identical) and the 2nd table does not suffer from the background problem when displayed on a NS browser.

<table bgcolor="#0000ff" cellspacing="4" cellpadding="0" border="0">
<tr><td width=50>cell A</td>
<td width=50>&amp;nbsp;</td></tr>
<tr><td>cell B</td>
<td>&amp;nbsp;</td></tr>
</table>

<table bgcolor="#0000ff" cellspacing="0" cellpadding="3" border="0">
<tr><td width=50>cell A</td>
<td width=50>&amp;nbsp;</td></tr>
<tr><td>cell B</td>
<td>&amp;nbsp;</td></tr>
</table>


Pyro: nbsp issue.
&ampampnbsp; gives &ampnbsp;

gil davis
02-08-2003, 06:40 PM
Originally posted by nedals
the 2nd table does not suffer from the background problem when displayed on a NS browser.I assumed that Geat wanted borders (at one point he said he didn't want cellspacing=0). Your "solution" has no borders. Since Geat never posted an example, it's probably a moot point. Perhaps he took the table-in-table idea and disappeared.

Geat
02-10-2003, 02:38 AM
I don't work at the weekends and hence I don't spend my time at this web site!

Thanks for the ideas - I'm gonna go with the table in table thing in the end.