Hi,
i have the following div heigh measurements for my web page:
wrapper: 1500px;
header: 100px
navigation: 50px
content: 1350px - emcompasses the next 3 divs
pagedesc: 100px
imagecontent: 1200px - used to display images as thumbnails
footer - 50px
On paper they calculate fine, however, after i have impletemented this in real life, i notice that with regards to my content div, it seems to grow in height by almost 50px forcing my footer to drop slighly lower down to the page and not taking affect of my footer details e.g background-color.
One thing i tried to experiment with was the content div, I tried to decrease the size of my heigh to 1250px but by doing so it revealed my footer but css used the background color of my wrapper to somehow overlap it making the background color red and completely disregarding my footer details.
Please help if you can.
html test file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> Shanghai Trip 2010</title>
<link rel="stylesheet" type="text/css" href="style_V1.css" />
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1> SHANGHAI TRIP 2010 </h1>
</div>
<div id="navigation">
<ul>
<li><a href="index.php?link=home">Home</a></li>
<li><a href="index.php?link=shanghaizoo">Shangai Zoo</a></li>
<li><a href="index.php?link=chengtemple">Cheng Huang Temple</a></li>
</ul>
</div>
<div id="content">
<div class="pagedesc">
<p>
</p>
</div>
<div class="imageswrapper">
</div>
</div>
<div id="footer">
FOOTER
</div>
</div>
</body>
</html>
/*
Date created: 7th October 2010
Last Modified: 7th October 2010
*/
body
{
background: #f3f2f3;
color: #000000;
font-family: Trebuchet MS, Arial, Times New Roman;
font-size: 12px;
}
#wrapper
{
background: red;
/* first value represents top/bottom, while second represents left/right margin */
margin: 0px auto;
width: 900px;
height: 1500px;
}
#header
{
background: #663300;
width: 900px;
height: 100px;
}
#navigation
{
overflow: hidden;
background: #3366CC;
width: 900px;
height: 50px;
}
#navigation ul
{
list-style-type: none;
margin: 0;
padding: 0;
}
#navigation li
{
display: block;
float: left;
padding: 2px;
}
#content
{
background: #993300;
width: 900px;
height: 1350px;
}
.pagedesc
{
width: 900px;
height: 100px;
font-size: 14px;
padding: 1px;
background-color: blue;
}
.pagedesc p
{
margin: 0;
border: 0;
padding: 0px;
}
.imageswrapper
{
margin: 0;
border: 1px solid #330066;
height: 1200px;
width: 900px;
overflow: hidden;
text-align: center;
float: left;
}
.thumb
{
margin: 3px;
border: 1px solid #ff8000;
padding: 0px;
height: auto;
text-align: center;
float: left;
}
.thumb img
{
display: inline;
margin: 5px;
border: 1px solid red;
padding: 0px;
}
.thumbdesc
{
text-align: center;
border: 1px solid black;
}
.footer
{
background: blue;
height: 50px;
width: 900px;
}
The page is not on the web as it is not finished but if you wouldn’t mind simply copying and pasting the code onto your editors, you will see what i mean
Thanks