TimeTraveler
IS-IT--Management
I'm having problems keeping the footer at the absolute bottom of the page (not just the Window). Boss wants to rollback to tables and or frames, and I'm looking to prevent that if possible.
Criteria:
1. Content section must always be to right of menu section, regardless of window size
2. Footer must remain below both menu and content
3. Only outer window scrollbar present, no scrolling within a div
What I've tried so far:
1. Searched this forum and did not find any solution
2. Searched W3C and did not get anywhere their, either
3. Tried various combinations of display, float, position:absolute and have not come up with a configuration that will perform as expected
4. Originally tried the div01 thru div04 classes by themselves, then put just 02 and 03 (menu and content) in a container, then tried 01 thrue 03 in a container (header, menu and content) and still the Footer does not want to hang out as the very bottom
Basic shape below:
[tt]
+-----------------------------+
|header |
+---------+-------------------+
|Menu +Content +
| + +
+---------+-------------------+
|footer |
+---------+-------------------+
[/tt]
Here's the code:
Thanks in advance for any help or comments.
-S
Criteria:
1. Content section must always be to right of menu section, regardless of window size
2. Footer must remain below both menu and content
3. Only outer window scrollbar present, no scrolling within a div
What I've tried so far:
1. Searched this forum and did not find any solution
2. Searched W3C and did not get anywhere their, either
3. Tried various combinations of display, float, position:absolute and have not come up with a configuration that will perform as expected
4. Originally tried the div01 thru div04 classes by themselves, then put just 02 and 03 (menu and content) in a container, then tried 01 thrue 03 in a container (header, menu and content) and still the Footer does not want to hang out as the very bottom
Basic shape below:
[tt]
+-----------------------------+
|header |
+---------+-------------------+
|Menu +Content +
| + +
+---------+-------------------+
|footer |
+---------+-------------------+
[/tt]
Here's the code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CSS 4-Section Layout</title>
<style type="text/css">
body {
margin: 0px 0px 0px 0px;
border: 0px
padding: 0px 0px 0px 0px;
font-family: Arial, Helvetica, Sans-serif;
background: cyan;
}
div {
margin: 0px 0px 0px 0px;
border: 0px
padding: 0px 0px 0px 0px;
}
.containerClass {
margin: 0px 0px 0px 0px;
border: 0px
padding: 0px 0px 0px 0px;
background: yellow;
display: block;
clear: all;
}
.div01Class {
height: 80px;
min-width: 400px;
margin: 0px 0px 0px 0px;
border: 0px;
padding: 0px 0px 0px 0px;
background: #AAA;
}
.div02Class {
position: absolute;
top: 80px;
left: 0px;
width: 200px;
margin: 0px 0px 0px 0px;
border: 0px;
padding: 0px 0px 0px 0px;
background: lightgreen;
/*
display: inline;
float: left;
*/
}
.div03Class {
position: absolute;
top: 80px;
left: 200px;
margin: 0px 0px 0px 0px;
border: 0px;
padding: 0px 0px 0px 0px;
background: #EEE;
/*
float: left;
display: inline;
*/
}
.div04Class {
clear: both;
margin: 0px 0px 0px 0px;
border: 0px;
padding: 0px 0px 0px 0px;
background: orange;
}
</style>
<script type="text/javascript">
var rows=100;
var cols=10;
</script>
</head>
<body>
<div class="containerClass">
<div class="div01Class">
<h2>Header</h2>
</div>
<div class="div02Class">
<h2>Menu</h2>
<ul>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
</ul>
</div><!-- div02Class -->
<div class="div03Class">
<h2>Content</h2>
<TABLE>
<CAPTION>
Table
</CAPTION>
<TR>
<TH>
Count
</TH>
<SCRIPT type="text/javascript">
for(colCnt=1;colCnt<=cols;colCnt=colCnt+1){
document.writeln("<TH nowrap>Column " + colCnt + "<\/TH>");
}
</script>
</TR>
<SCRIPT type="text/javascript">
var rnd = 0;
for(rowCnt=1;rowCnt<=rows;rowCnt=rowCnt+1){
document.writeln("<TR>");
document.writeln("<TD>" + rowCnt + "<\/TD>");
for(colCnt=1;colCnt<=cols;colCnt=colCnt+1){
rnd = Math.random();
rnd = Math.round(rnd * 100);
document.writeln("<TD>" + rnd + "<\/TD>");
}
document.writeln("<\/TR>");
}
</script>
</TABLE>
</div>
</div><div class="div04Class">
<h2>Footer</h2>
</div>
</body>
</html>
Thanks in advance for any help or comments.
-S