Inga.
12-06-2008, 05:28 PM
I've created a layout with two main layers that site side by side in the main container (I sort of copied from a default DW template since I never made a site in layers before). I have a background image in the main container that I want to continue to run down the page until the footer and I want space between the two main layers that stand side by side. So, I made another div called #space and placed it after the second main content layer but before the footer.
However, the #space div is sitting only under my right main content div and not under the left one. I'm not sure what I've done wrong here. I will show the code below and perhaps someone can point out the error of my ways?
Leftside layer
.twoColHybLtHdr #sidebar1 {
float: left;
width: 290px;
padding: 0px 0;
margin: 30px 0 0 80px;
text-align:left;
vertical-align:top;
min-height:640px;
max-height:780px;
}
Rightside layer
.twoColHybLtHdr #maincontent {
width: 525px;
margin: 30px 20px 0 400px;
text-align:left;
vertical-align:top;
min-height: 640px;
max-height: 780px;
}
Spacer layer
.twoColHybLtHdr #space {
text-align:left;
vertical-align:top;
padding: 0 0;
height:30px;
}
.clearfloat {
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
And the code on the page minus the text
<div id="sidebar1">
some content
</div>
<div id="maincontent">
some content
</div>
<div id="space"></div>
<br class="clearfloat" />
However, the #space div is sitting only under my right main content div and not under the left one. I'm not sure what I've done wrong here. I will show the code below and perhaps someone can point out the error of my ways?
Leftside layer
.twoColHybLtHdr #sidebar1 {
float: left;
width: 290px;
padding: 0px 0;
margin: 30px 0 0 80px;
text-align:left;
vertical-align:top;
min-height:640px;
max-height:780px;
}
Rightside layer
.twoColHybLtHdr #maincontent {
width: 525px;
margin: 30px 20px 0 400px;
text-align:left;
vertical-align:top;
min-height: 640px;
max-height: 780px;
}
Spacer layer
.twoColHybLtHdr #space {
text-align:left;
vertical-align:top;
padding: 0 0;
height:30px;
}
.clearfloat {
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
And the code on the page minus the text
<div id="sidebar1">
some content
</div>
<div id="maincontent">
some content
</div>
<div id="space"></div>
<br class="clearfloat" />