Im making a site template, but iv never made one before (Well once but it sucked) and im currently making my first style sheet.. anyhow i have this messed up problem. il show you my code first:
CSS:
Code:
#contentbg {
width: 700px;
float: left;
background: url(images/contentbg.jpg);
margin-left: 20px;
}
#contenttop{
width: 700px;
float: left;
height: 18px;
background: url(images/contenttop.jpg);
margin-left: 20px;
}
#contentbottom{
width: 700px;
float: left;
height: 18px;
background: url(images/contentbottom.jpg);
margin-left: 20px;
}
#content{
width: 650px;
float: left;
margin-left: 20px;
padding-left: 5px;
}
Template code (the part causing problems):
Code:
<div id="contenttop">
</div>
<div id="contentbg">
<div id="content">
**content goes here**
</div>
</div>
<div id="contentbottom">
</div>
<p>
<center>
<font size="1"><a href="index.php?module=about">About</a> :: <a href="index.php?module=staff">Staff</a> :: <a href="index.php?module=contact">Contact</a> :: <a href="index.php?module=jobs">Jobs</a></font>
</center>
Basicly whats happening is when i have the float: left; on my style sheet its pushing the footer onto the top right of the page (the stuff with links to staff, about etc.). when i take the float off everything looks ok...except that there is a weird gap between my bottom div and the one above it. Iv been trying to figure this our for a few hours now and nothing works! Help will be greatly apreciated.
|