Solved

Nested Table Problem in NS

Posted on 2000-03-12
5
245 Views
Last Modified: 2010-04-09
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
Comment
Question by:nasile
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 50 total points
ID: 2610722
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
 

Author Comment

by:nasile
ID: 2611045
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
 
LVL 8

Expert Comment

by:jbirk
ID: 2611050
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
 

Author Comment

by:nasile
ID: 2614773
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
 
LVL 8

Expert Comment

by:jbirk
ID: 2628314
Good luck!
-Josh
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now