Solved

Nested Table Problem in NS

Posted on 2000-03-12
5
249 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS: Forcing Tables Where the Width is Greater than 1000px to Behave Like Width: 100% 8 47
Javascript 2 38
Asp response.write to clients 6 34
Link Anchor Not working 9 49
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

733 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