That's exactly what I forgot to do; however, it didn't solve the problem. The footer was aligned left and behind the container div ... even centering it and giving it a zindex to bring it forward ... the container div extended below it. (and z-index didn't bring it forward)
Here's my most updated code:
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitl ed Document</title>
<link href="styles3.c ss" rel="stylesheet " type="text/css" />
</head>
<body>
<div id="container" >
<div id="midcol">fir st in html first in html first in html first in html first in html first in html first in html first in html first in html first in html </div>
<div id="leftcol">se cond in html second in html second in html second in html second in html second in html second in html second in html second in html second in html </div>
<div id="rightcol">t hird in html third in html third in html third in html third in html third in html third in html third in html third in html third in html third in html </div>
</div>
<div id="footer">fou rth in html</div>
<div id="header">
<div id="croheader"> fifth in html</div>
</div>
</body>
</html>
CSS
/* CSS Document */
html, body {
margin: auto;
height: 100%;
}
body {
position: relative;
}
#container {
position: relative;
top: 50px;
width: 920px;
margin: 0 auto;
background: #CCFFFF;
height: 100%;
}
#container #leftcol {
float: left;
width: 200px;
top: 0;
background: #CC0000;
height: 100%;
}
#container #midcol {
position: absolute;
left: 200px;
width: 585px;
background: #0099FF;
height: 100%;
}
#container #rightcol {
float: right;
width: 135px;
background: #99FF99;
height: 100%;
}
#footer {
width: 920px;
background: #CCCCCC;
margin: auto;
z-index: 1;
}
#header {
position: absolute;
top: 0;
width: 100%;
height: 50px;
background: #FFCC66;
}
#header #croheader {
width: 920px;
height: 50px;
background: #CCC;
margin: 0 auto;
}
Here's my most updated code:
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitl ed Document</title>
<link href="styles3.c ss" rel="stylesheet " type="text/css" />
</head>
<body>
<div id="container" >
<div id="midcol">fir st in html first in html first in html first in html first in html first in html first in html first in html first in html first in html </div>
<div id="leftcol">se cond in html second in html second in html second in html second in html second in html second in html second in html second in html second in html </div>
<div id="rightcol">t hird in html third in html third in html third in html third in html third in html third in html third in html third in html third in html third in html </div>
</div>
<div id="footer">fou rth in html</div>
<div id="header">
<div id="croheader"> fifth in html</div>
</div>
</body>
</html>
CSS
/* CSS Document */
html, body {
margin: auto;
height: 100%;
}
body {
position: relative;
}
#container {
position: relative;
top: 50px;
width: 920px;
margin: 0 auto;
background: #CCFFFF;
height: 100%;
}
#container #leftcol {
float: left;
width: 200px;
top: 0;
background: #CC0000;
height: 100%;
}
#container #midcol {
position: absolute;
left: 200px;
width: 585px;
background: #0099FF;
height: 100%;
}
#container #rightcol {
float: right;
width: 135px;
background: #99FF99;
height: 100%;
}
#footer {
width: 920px;
background: #CCCCCC;
margin: auto;
z-index: 1;
}
#header {
position: absolute;
top: 0;
width: 100%;
height: 50px;
background: #FFCC66;
}
#header #croheader {
width: 920px;
height: 50px;
background: #CCC;
margin: 0 auto;
}
Comment