Kyra
05-19-2009, 11:10 AM
I'm about to tear the hairs off my head! i can't seem to fix the problem of my content overlapping the footer. I've looked and browsed through most of the forum topics and tried out the solutions but it doesn't seem to work for me! this is my first attempt at div coding and i'd really appreciate it if someone could help me out! I'd like the leftmenu and content to NOT overlap the footer when the text overflows.
This is my coding:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image: url(bg.png);
background-repeat: repeat-x;
margin-top: 0px;
}
#topbg {
width:1000px;
height:500px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
background-image: url(bgtop.png);
background-repeat: no-repeat;
}
#mainframe {
width:876px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
}
#header {
width:876px;
height:105px;
margin-top: 0px;
}
#mainmenu {
width:876px;
height:32px;
margin-top: 0px;
padding-top: 7px;
}
#topdivider {
width:876px;
height:33px;
margin-top: 0px;
padding: 3px 0;
}
#leftmenu {
width:213px;
float:left;
margin-bottom: 335px; /* height of footer */
z-index:99;
position:absolute;
}
#content {
width:663px;
float:right;
margin-left: 213px;
margin-bottom: 335px; /* height of footer */
z-index:99;
position:absolute;
overflow:auto;
}
#footer {
width:876px;
height:108px;
margin-left: auto;
margin-right: auto;
}
#bottombg {
width:1000px;
height:335px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
padding-bottom: 0;
background-image: url(bgbottom.png);
background-repeat: no-repeat;
}
-->
</style>
</head>
<body>
<div id="topbg">
<div id="mainframe">
<div id="header">"header"</div>
<div id="mainmenu">"mainmenu"</div>
<div id="topdivider">"topdivider"</div>
<div id="leftmenu">
<p> </p>
<p>leftmenu</p>
<p>b</p>
<p>c</p>
<p>d</p>
</div>
<div id="content">
<p>"content"</p>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p> </p>
</div>
"mainframe"</div>
"topbg"</div>
<div id="bottombg">
<div id="footer">"footer"</div>
"bottombg"</div>
</body>
</html>
Am i coding it wrongly? Please help! :(
This is my coding:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image: url(bg.png);
background-repeat: repeat-x;
margin-top: 0px;
}
#topbg {
width:1000px;
height:500px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
background-image: url(bgtop.png);
background-repeat: no-repeat;
}
#mainframe {
width:876px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
}
#header {
width:876px;
height:105px;
margin-top: 0px;
}
#mainmenu {
width:876px;
height:32px;
margin-top: 0px;
padding-top: 7px;
}
#topdivider {
width:876px;
height:33px;
margin-top: 0px;
padding: 3px 0;
}
#leftmenu {
width:213px;
float:left;
margin-bottom: 335px; /* height of footer */
z-index:99;
position:absolute;
}
#content {
width:663px;
float:right;
margin-left: 213px;
margin-bottom: 335px; /* height of footer */
z-index:99;
position:absolute;
overflow:auto;
}
#footer {
width:876px;
height:108px;
margin-left: auto;
margin-right: auto;
}
#bottombg {
width:1000px;
height:335px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
padding-bottom: 0;
background-image: url(bgbottom.png);
background-repeat: no-repeat;
}
-->
</style>
</head>
<body>
<div id="topbg">
<div id="mainframe">
<div id="header">"header"</div>
<div id="mainmenu">"mainmenu"</div>
<div id="topdivider">"topdivider"</div>
<div id="leftmenu">
<p> </p>
<p>leftmenu</p>
<p>b</p>
<p>c</p>
<p>d</p>
</div>
<div id="content">
<p>"content"</p>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p> </p>
</div>
"mainframe"</div>
"topbg"</div>
<div id="bottombg">
<div id="footer">"footer"</div>
"bottombg"</div>
</body>
</html>
Am i coding it wrongly? Please help! :(