lol-i
03-13-2006, 09:23 AM
i have a problem here which is the leftnav being bigger than my page body.
since its a absolute div and the body is a relative div, its cutted in the end of the page, coming over the footer.
here is the sample:
<!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>Untitled Document</title>
<style type="text/css">
#container {
position: relative;
width: 779px;
margin-left: auto;
margin-right: auto;
background:#fff;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
#leftnav {
position: absolute;
left: 20px;
top: 20px;
width: 100px;
background:#e8e8e8;
}
#mainbody {
position: relative;
margin-left: 150px;
}
#footer {
position: relative;
background:#c1c1c1;
}
</style>
</head>
<div id="container">
<div id="leftnav">
<ul>
<li>Topic 1</li>
<li>Topic 2</li>
<li>Topic 3</li>
<li>Topic 4</li>
</ul>
<ul>
<li>Topic 5</li>
<li>Topic 6</li>
<li>Topic 7</li>
<li>Topic 8</li>
</ul>
<ul>
<li>Topic 9</li>
<li>Topic 10</li>
<li>Topic 11</li>
<li>Topic 12</li>
</ul>
<ul>
<li>Topic 13</li>
<li>Topic 14</li>
<li>Topic 15</li>
<li>Topic 16</li>
</ul>
<ul>
<li>Topic 17</li>
<li>Topic 18</li>
<li>Topic 19</li>
<li>Topic 20</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul></div>
<div id="mainbody">
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
</div>
<div id="footer">End of the Page</div>
</div><body>
</body>
</html>
what can i do to sort it out? make the footer stay always lower than a absolute
since its a absolute div and the body is a relative div, its cutted in the end of the page, coming over the footer.
here is the sample:
<!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>Untitled Document</title>
<style type="text/css">
#container {
position: relative;
width: 779px;
margin-left: auto;
margin-right: auto;
background:#fff;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
#leftnav {
position: absolute;
left: 20px;
top: 20px;
width: 100px;
background:#e8e8e8;
}
#mainbody {
position: relative;
margin-left: 150px;
}
#footer {
position: relative;
background:#c1c1c1;
}
</style>
</head>
<div id="container">
<div id="leftnav">
<ul>
<li>Topic 1</li>
<li>Topic 2</li>
<li>Topic 3</li>
<li>Topic 4</li>
</ul>
<ul>
<li>Topic 5</li>
<li>Topic 6</li>
<li>Topic 7</li>
<li>Topic 8</li>
</ul>
<ul>
<li>Topic 9</li>
<li>Topic 10</li>
<li>Topic 11</li>
<li>Topic 12</li>
</ul>
<ul>
<li>Topic 13</li>
<li>Topic 14</li>
<li>Topic 15</li>
<li>Topic 16</li>
</ul>
<ul>
<li>Topic 17</li>
<li>Topic 18</li>
<li>Topic 19</li>
<li>Topic 20</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul>
<ul>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
<li>Topic 1</li>
</ul></div>
<div id="mainbody">
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
<p>sample</p>
</div>
<div id="footer">End of the Page</div>
</div><body>
</body>
</html>
what can i do to sort it out? make the footer stay always lower than a absolute