doni
11-18-2002, 02:36 AM
I'm attempting to convert from a frames based site to a tables based site to avoid the headaches associated with frames.
However, I'm running into a couple of different snags.
The top row would be the header, the second row would be split into 2 columns w/ the nav menu down the left side and the content on the right last but not least, their would be a footer across the bottom.
Now the problems:
How can I make it so that if the middle row doesn't take up enough room to fill the browser window, the footer row is forced to the bottom of the browser window. If the middle row takes up enough space to cause the browser to scroll, the footer row would just go below the content as far down as it needs to be.
I want to use style sheets so that if I need to make changes, I won't have to change EVERY page. With the exception of the background this worked fine using classes. The body content cells should be Blue text on white background while the OTHER cells should all be white text on blue background.
I attempted to do this through nested tables--not quite sure if I went about that the right way though.
Here's the code I've come up with so far:
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="StyleSheets/Styles.css">
</HEAD>
<BODY>
<TABLE CLASS="nav" WIDTH="100%" HEIGHT="100%"> <!-- First Table -->
<TR HEIGHT="30">
<TD ALIGN="LEFT"> <H1>Welcome to My Site </H1></TD>
</TR>
<TR>
<TD>
<TABLE WIDTH="100%" HEIGHT="*"> <!-- Second Table -->
<TR>
<TD WIDTH="50"> ROW 2 COL 1</TD>
<TD CLASS="normal">
<TABLE WIDTH="100%" CLASS="normal"> <!-- Third Table -->
<TR><TD VALIGN="TOP"><P>ROW 2 COL 2</P></TD></TR>
</TABLE> <!-- End Third Table --></TD>
</TR>
</TABLE> <!-- End Second Table --></TD>
</TR>
<TR HEIGHT="10"><TD ALIGN="CENTER">Copyright 2002 Don I, All rights reserved.</TD>
</TR>
</TABLE> <!-- End First Table -->
</BODY>
</HTML>
The CSS page:
@media screen
{
.normal{
ul.star {list-style-image: url(images/star.jpg);}
a:link{text-decoration: none; color: #000066; margin-left: 5px}
a:visited{text-decoration: none; color: #000066; margin-left: 5px}
a:hover{text-decoration: underline; color: #000066; margin-left: 5px}
h1,h2,h3,h4 {color: #000099; margin-left: 5px}
table,tr,td,p {color: #0000CC; margin-left: 5px}
hr{margin-left: 3px;margin-right: -1px;}
}}
@media print
{.normal{
ul.star {list-style-image: url(images/star.jpg);}
a:link,a:visited,a:hover,h1,h2,h3,h4,p,body{background-color: #FFFFFF}
a:link{text-decoration: none; color: #000000; margin-left: 5px}
a:visited{text-decoration: none; color: #000000; margin-left: 5px}
a:hover{text-decoration: underline; color: #000000; margin-left: 5px}
table,tr,td,h1,h2,h3,h4 {color: #000000; margin-left: 5px}
p {color: #000000; margin-left: 5px}
}}
@media screen
{.nav{
ul.star {list-style-image: url(images/star.jpg);}
a:link,a:visited,a:hover,h1,h2,h3,h4,p,body{color: #ffffff}
a:link{text-decoration: none; color: #ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: overline underline; color: #FFFF00}
a:link,a:visited,a:hover,h1,h2,h3,h4,p{color: #ffffff;background-color: #0000cd;}
}}
@media print
{.nav{
ul.star {list-style-image: url(images/star.jpg);}
a:link{text-decoration: none; color: #ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: overline underline; color: #FFFF00}
}}
Thanks again.
However, I'm running into a couple of different snags.
The top row would be the header, the second row would be split into 2 columns w/ the nav menu down the left side and the content on the right last but not least, their would be a footer across the bottom.
Now the problems:
How can I make it so that if the middle row doesn't take up enough room to fill the browser window, the footer row is forced to the bottom of the browser window. If the middle row takes up enough space to cause the browser to scroll, the footer row would just go below the content as far down as it needs to be.
I want to use style sheets so that if I need to make changes, I won't have to change EVERY page. With the exception of the background this worked fine using classes. The body content cells should be Blue text on white background while the OTHER cells should all be white text on blue background.
I attempted to do this through nested tables--not quite sure if I went about that the right way though.
Here's the code I've come up with so far:
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="StyleSheets/Styles.css">
</HEAD>
<BODY>
<TABLE CLASS="nav" WIDTH="100%" HEIGHT="100%"> <!-- First Table -->
<TR HEIGHT="30">
<TD ALIGN="LEFT"> <H1>Welcome to My Site </H1></TD>
</TR>
<TR>
<TD>
<TABLE WIDTH="100%" HEIGHT="*"> <!-- Second Table -->
<TR>
<TD WIDTH="50"> ROW 2 COL 1</TD>
<TD CLASS="normal">
<TABLE WIDTH="100%" CLASS="normal"> <!-- Third Table -->
<TR><TD VALIGN="TOP"><P>ROW 2 COL 2</P></TD></TR>
</TABLE> <!-- End Third Table --></TD>
</TR>
</TABLE> <!-- End Second Table --></TD>
</TR>
<TR HEIGHT="10"><TD ALIGN="CENTER">Copyright 2002 Don I, All rights reserved.</TD>
</TR>
</TABLE> <!-- End First Table -->
</BODY>
</HTML>
The CSS page:
@media screen
{
.normal{
ul.star {list-style-image: url(images/star.jpg);}
a:link{text-decoration: none; color: #000066; margin-left: 5px}
a:visited{text-decoration: none; color: #000066; margin-left: 5px}
a:hover{text-decoration: underline; color: #000066; margin-left: 5px}
h1,h2,h3,h4 {color: #000099; margin-left: 5px}
table,tr,td,p {color: #0000CC; margin-left: 5px}
hr{margin-left: 3px;margin-right: -1px;}
}}
@media print
{.normal{
ul.star {list-style-image: url(images/star.jpg);}
a:link,a:visited,a:hover,h1,h2,h3,h4,p,body{background-color: #FFFFFF}
a:link{text-decoration: none; color: #000000; margin-left: 5px}
a:visited{text-decoration: none; color: #000000; margin-left: 5px}
a:hover{text-decoration: underline; color: #000000; margin-left: 5px}
table,tr,td,h1,h2,h3,h4 {color: #000000; margin-left: 5px}
p {color: #000000; margin-left: 5px}
}}
@media screen
{.nav{
ul.star {list-style-image: url(images/star.jpg);}
a:link,a:visited,a:hover,h1,h2,h3,h4,p,body{color: #ffffff}
a:link{text-decoration: none; color: #ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: overline underline; color: #FFFF00}
a:link,a:visited,a:hover,h1,h2,h3,h4,p{color: #ffffff;background-color: #0000cd;}
}}
@media print
{.nav{
ul.star {list-style-image: url(images/star.jpg);}
a:link{text-decoration: none; color: #ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: overline underline; color: #FFFF00}
}}
Thanks again.