Forum Moderators: not2easy

Message Too Old, No Replies

Text color in Netscape 4

not being applied

         

seashell

3:07 pm on Oct 28, 2003 (gmt 0)

10+ Year Member



I'm having a strange problem in Netscape 4. I have a table row with a dark colored background and lighter colored text. It works great in IE, Mozilla, Opera and Netscape 7, but in Netscape 4 it only works sometimes. There are 6 columns and it only worked in 2 of them. I looked at the two cells to see what was different about them and I couldn't find anything. Then I noticed that the cells displaying correctly (or as close to correctly as Netscape 4 can handle) had text filling the entire cell so the text was touching the sides. Just to test, I added some text to one-word cell to make it touch the sides, and sure enough, the text changed to the correct color.

I easily fixed this by applying the style to the cell instead of the row. I'm just curious if anyone has come across this problem before.

Here's my css:

tr.drk td {background: url(styleimg/drkblue.gif); color: #eee; }
tr.med td {background: url(styleimg/medblue.gif); color: #eee; }
td {background: url(styleimg/ltblue.gif);}

HTML:

<table>
<tr class="drk">
<td>text</td>
<td>text</td>
<td>text</td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr>
</table>

Do you see a typo that may create this problem or is my browser just smoking crack?

DrDoc

3:38 pm on Oct 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



NN4 is extremely buggy when it comes to CSS. If the problem is a background, setting the border attribute in your style sheet helps, even if you set it to the default "none".

tr.drk td {background: url(styleimg/drkblue.gif); color: #eee; border: none;}
tr.med td {background: url(styleimg/medblue.gif); color: #eee; border: none;}
td {background: url(styleimg/ltblue.gif); border: none;}

seashell

4:08 pm on Oct 28, 2003 (gmt 0)

10+ Year Member



Didn't work in this case, but I'll keep it in mind in the future. I'm happy with how it looks in NN4 anyway, because it's readable and somewhat similar to what I intended it to look like.

I always thought borders did more harm than good. Until now, I've always automatically hidden them from NN4. Maybe I should investigate further on some old stylesheet's I've done.

I know setting the border attribute to none on images in NN4 creates a big gap. I thought this might be the case with tables too...