Click to See Complete Forum and Search --> : Netscape Table Woes
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.
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!
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...
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.
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.
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:
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...
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.
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)
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.
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:
That's what I have done, but I'd have thought that netscape would have some attribute you could set to avoid the gaps.
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.
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. :(
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!
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.
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"
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...
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
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...
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
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
Stefan
02-07-2003, 11:19 AM
Originally posted by meow
Det var som fan! :D
Världen e liten :D
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.
<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> </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>&nbsp;</td></tr>
<tr><td>cell B</td>
<td>&nbsp;</td></tr>
</table>
<table bgcolor="#0000ff" cellspacing="0" cellpadding="3" border="0">
<tr><td width=50>cell A</td>
<td width=50>&nbsp;</td></tr>
<tr><td>cell B</td>
<td>&nbsp;</td></tr>
</table>
Pyro: nbsp issue.
&ampnbsp; gives &nbsp;
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.
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.