• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

Nested Table Problem in NS

The following code displays properly in IE but when viewd in NS the last line displayed ( <p>Here is some test text... ) displays incorrecty... the font and colors are displayed in browser default instead of those I set with the style. The weird thing is that if I remove the nested table everything works find in both browsers. I can't seem to find any error in this code...

Could someone shed some light on me please?

Thanks


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Guild Hoard</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>

<STYLE>
BODY { BACKGROUND-COLOR:#006699; COLOR:#FFFFFF; FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-WEIGHT:normal; FONT-SIZE:12pt;BACKGROUND-IMAGE: url(http://server/designarea/images/tbg.gif);}
TD.tableBorder { BACKGROUND-COLOR:#000000;}
TH { BACKGROUND-COLOR:#FFA500; COLOR:#000000; FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-SIZE:12pt; FONT-WEIGHT:bold;}
TD { BACKGROUND-COLOR:#FFFF99; COLOR:#000000; FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-SIZE:12pt; FONT-WEIGHT:normal;}
TABLE { BACKGROUND-COLOR:#000000;}
A { COLOR:#FFFF00; FONT-WEIGHT:normal;}TD A { COLOR:#0000FF; FONT-WEIGHT:normal;}
</STYLE>
</HEAD>
<BODY>

<table cellpadding=0 cellspacing=0 border=0>
<tr><td class="tableBorder">

      <table cellpadding=1 cellspacing=1 border=0>
            <tr>
                  <td>
                  Test
                  </td>
            </tr>
      </table>
      
</td></tr>
</table>

<p>Here is some test text. And here is a <a href="">Link</a></p>

</BODY>
</HTML>
0
nasile
Asked:
nasile
  • 3
  • 2
1 Solution
 
jbirkCommented:
I see this problem too... it seems that the table is screwing up the styles for the body tag.  If you put the text before the table it renders fine...  But the text after the table is messed up.  Seems like yet another bug.  There is a workaround though.  Try adding the style for your text in the P tag:

BODY { BACKGROUND-COLOR:#006699; BACKGROUND-IMAGE:url(http://server/designarea/images/tbg.gif);}
TH { BACKGROUND-COLOR:#FFA500; COLOR:#000000; FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-SIZE:12pt; FONT-WEIGHT:bold;}
TD { BACKGROUND-COLOR:#FFFF99; COLOR:#000000; FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-SIZE:12pt; FONT-WEIGHT:normal;}
TABLE { BACKGROUND-COLOR:#000000;}
A { COLOR:#FFFF00; FONT-WEIGHT:normal;}
P {FONT-FAMILY:Arial,Helvetica,sans-serif; FONT-WEIGHT:normal; FONT-SIZE:12pt;COLOR:#FFFFFF;}


This seems to work ok.
-Josh
0
 
nasileAuthor Commented:
Does it actually boil down to bugs!? Have I stated that I really hate netscape? Well... I Do.

I'm aware of using another tag to get around the problem such as <p>... I was just kind of hoping there was another way to do this or that maybe I had some silly error in my code.

I actually don't use a <p> tag since I don't want to have to worry about setting a tag for every area I place text in the document. I set up a class and then wrapped the whole document in a <div> tag...

<body><div class=blah>
....
....
</div></body>

0
 
jbirkCommented:
It's definitely a bug, the only question is how best to get around that bug...  There are probably quite a few ways to get around it.  The P tag just being the first that came to mind for me...
The behavior exhibited definitely categorizes as a bug!

I wish there was a good reliable universal browser out there...  ahhh.... the dream....  (I actually prefer Netscape, though I don't 'like' it persay...  just like IE less...)

-Josh
0
 
nasileAuthor Commented:
Thanks for the input josh... the div tag solution I tried isn't even even sure fire.. the more code that goes in the page the more the problem exist. Looks like I'll have to wrap all the text in tags =(
0
 
jbirkCommented:
Good luck!
-Josh
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now