Forum Moderators: open

Message Too Old, No Replies

Nested Tables problem!

nested table layout

         

eternal

8:07 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



I have several nested tables, one for the header, one for, the main content section and one for the footer. These are contained in one table which is in a div (for centralized purposes).
Now it look ok in Opera, IE, Mozilla but in netscape 7 the header table doesn't show?
Here is my code:

----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<link href="stylez.css" rel="stylesheet" type="text/css">
</head>

<body style="text-align:center;">
<div style="width:680px; margin-left:auto; margin-right:auto;">
<table class="box" cellpadding="0" cellspacing="0" align="center">
<tr valign="top">
<td>
<!--1st Nested ECF-->
<!---------------------------------------------------------------------------------------------------------->
<table cellpadding="0" cellspacing="0">
<tr>
<td class="logo"><img src="images/ecf.gif" alt=" Logo"></td>
<td class="flash">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="440" height="140">
<param name="movie" value="images/movie.swf">
<param name="quality" value="high">
<embed src="images/movie.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="440" height="140"></embed></object>
</td>
</tr>
</table>
<!---------------------------------------------------------------------------------------------------------->
<!--END head ECF-->
</td>
</tr>
<tr>
<td colspan="3" height="20">
<!--menu-->
<table class="menu" cellpadding="0" cellspacing="0">
<tr>
<td class="color">&nbsp;</td>
</tr>
</table>
<!--END MENU-->
</td>
</tr>
<tr valign="top">
<td>
<!--second nested-->
<table class="content" cellpadding="0" cellspacing="0">
<tr valign="top">
<td class="home" height="300"><p><strong>Welcome to
</strong></p>
</td>
</tr>
</table>
<!--End second nested-->
</td>
<tr>
<td colspan="4">
<!--footer-->
<table class="footer" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<!--end footer-->
</td>
</tr>
</table>
</div>
</body>
</html>
-------------------

Does anyone know why?

sonjay

8:16 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



Netscape tends to choke if there are any missing or mal-formed table, td, or tr tags. I see this near the end of your code:

<!--End second nested-->
</td>
<tr>
<td colspan="4">

You can't have a </td> followed immediately by a <tr> -- you need </tr> in there. Try fixing that and see if Netscape likes your code better.

encyclo

8:45 pm on Oct 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try removing those long-line comments: in standards-compliance mode, comments should only be in the form:

<!-- comment -->

That is, with two dashes at the beginning and end, not more.

It seemed to fix it for me, but you should also heed sonjay's advice about closing tags which, even though the document validates as HTML 4.01, can cause problems if there are missing

</td>
or
</tr>
tags.

eternal

8:59 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



ahh blimey yup that solved it, thanks guys.