edd1e
09-12-2007, 11:24 PM
Hi again guys,
i have almost finished my layout in CSS and i just need it to fill 100% height, i have done this but the page takes up more than 100% for some reasion in both FF and IE6 and causes the page to scroll, look here:
CLICKY!! (http://www.eddnichols.co.uk/temp)
Here is the code:
HTML
<!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>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="navbar"></div>
<div id="header_image"></div>
<div id="latest_news"></div>
<!-- start 3 columns -->
<div id="news_container">
<div id="news_left"></div>
<div id="news_center"></div>
<div id="news_right"></div>
</div> <!-- news container -->
<div id="services_container">
<div id="services_left"> </div>
<div id="pilar"><br />
<img src="images/layout_r7_c6.jpg" width="28" height="81" /></div>
<div id="services_center"> </div>
<div id="pilar"><br />
<img src="images/layout_r7_c6.jpg" width="28" height="81" /></div>
<div id="services_right"> </div>
</div> <!-- services container -->
<div id="content">miain, this should strech 100% height</div>
<div id="footer">footer</div>
</div>
</body>
</html>
CSS:
body {
text-align: center; /* center's things in pre IE6 */
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(images/background.jpg);
background-repeat: repeat-x;
background-color: #545454;
}
html,body {
height:100%;
}
#container {
margin: 0 auto;
width: 556px;
min-height: 100%;
height: 100%;
text-align: left;
background-color: #CCCCCC;
padding: 0px;
}
#navbar {
width: auto;
height: 62px;
}
#header_image {
width: auto;
background-color: #009999;
height: 149px;
}
#latest_news {
width: auto;
background-color: #009999;
height: 35px;
min-height: 35px;
}
#news_container {
width: 556px;
height: 49px;
min-height: 49px;
overflow: hidden;
}
#news_left {
float: left;
width: 23px;
height: auto;
background-color: #000099;
min-height: 80px;
overflow: hidden;
}
#news_center {
float: left;
width: 512px;
height: auto;
background-color: #333333;
min-height: 80px;
}
#news_right {
float: right;
width: 21px;
height: auto;
background-color: #000099;
min-height: 80px;
overflow: hidden;
}
#news_bottom {
width: 556px;
background-color: #009999;
height: 7px;
min-height: 7px;
}
#services_container {
width: 556px;
height: 111px;
min-height: 111px;
background-color: #FFFFFF;
}
#services_left {
float: left;
width: 166px;
height: 111px;
min-height: 111px;
overflow: hidden;
}
#services_center {
float: left;
width: 166px;
height: 111px;
min-height: 111px;
}
#pilar {
float: left;
width: 28px;
height: 111px;
min-height: 111px;
background-color: #FFFFFF;
vertical-align: bottom;
}
#services_right {
float: right;
width: 166px;
height: 111px;
min-height: 111px;
overflow: hidden;
}
#content_container {
background-color: #CCCCCC;
height: 100%;
min-height: 100%;
width: 556px;
}
#content {
clear: both;
background-color: #336666;
height: 100%;
min-height: 100%;
width: 556px;
overflow: auto;
}
#footer {
clear: both;
background-color: #333333;
min-height: 35px;
width: 556px;
}
Any ideas guys? cheers,
Edd :)
i have almost finished my layout in CSS and i just need it to fill 100% height, i have done this but the page takes up more than 100% for some reasion in both FF and IE6 and causes the page to scroll, look here:
CLICKY!! (http://www.eddnichols.co.uk/temp)
Here is the code:
HTML
<!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>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="navbar"></div>
<div id="header_image"></div>
<div id="latest_news"></div>
<!-- start 3 columns -->
<div id="news_container">
<div id="news_left"></div>
<div id="news_center"></div>
<div id="news_right"></div>
</div> <!-- news container -->
<div id="services_container">
<div id="services_left"> </div>
<div id="pilar"><br />
<img src="images/layout_r7_c6.jpg" width="28" height="81" /></div>
<div id="services_center"> </div>
<div id="pilar"><br />
<img src="images/layout_r7_c6.jpg" width="28" height="81" /></div>
<div id="services_right"> </div>
</div> <!-- services container -->
<div id="content">miain, this should strech 100% height</div>
<div id="footer">footer</div>
</div>
</body>
</html>
CSS:
body {
text-align: center; /* center's things in pre IE6 */
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(images/background.jpg);
background-repeat: repeat-x;
background-color: #545454;
}
html,body {
height:100%;
}
#container {
margin: 0 auto;
width: 556px;
min-height: 100%;
height: 100%;
text-align: left;
background-color: #CCCCCC;
padding: 0px;
}
#navbar {
width: auto;
height: 62px;
}
#header_image {
width: auto;
background-color: #009999;
height: 149px;
}
#latest_news {
width: auto;
background-color: #009999;
height: 35px;
min-height: 35px;
}
#news_container {
width: 556px;
height: 49px;
min-height: 49px;
overflow: hidden;
}
#news_left {
float: left;
width: 23px;
height: auto;
background-color: #000099;
min-height: 80px;
overflow: hidden;
}
#news_center {
float: left;
width: 512px;
height: auto;
background-color: #333333;
min-height: 80px;
}
#news_right {
float: right;
width: 21px;
height: auto;
background-color: #000099;
min-height: 80px;
overflow: hidden;
}
#news_bottom {
width: 556px;
background-color: #009999;
height: 7px;
min-height: 7px;
}
#services_container {
width: 556px;
height: 111px;
min-height: 111px;
background-color: #FFFFFF;
}
#services_left {
float: left;
width: 166px;
height: 111px;
min-height: 111px;
overflow: hidden;
}
#services_center {
float: left;
width: 166px;
height: 111px;
min-height: 111px;
}
#pilar {
float: left;
width: 28px;
height: 111px;
min-height: 111px;
background-color: #FFFFFF;
vertical-align: bottom;
}
#services_right {
float: right;
width: 166px;
height: 111px;
min-height: 111px;
overflow: hidden;
}
#content_container {
background-color: #CCCCCC;
height: 100%;
min-height: 100%;
width: 556px;
}
#content {
clear: both;
background-color: #336666;
height: 100%;
min-height: 100%;
width: 556px;
overflow: auto;
}
#footer {
clear: both;
background-color: #333333;
min-height: 35px;
width: 556px;
}
Any ideas guys? cheers,
Edd :)