positioning with div's
Posted: Tue 2. Aug 2005, 20:57
I'm trying to build a website with div's icm with the 2 column
template. My problem is that the left column doesn't scales with the
right column.
So I tried to place both div's in another div and asign the background
image to the center div.
Structure:
But then I have troubles with positioning the left and right div's in
the center div.
My css:
Very strange because this code does works for a normal .html file written with a text editor
template. My problem is that the left column doesn't scales with the
right column.
So I tried to place both div's in another div and asign the background
image to the center div.
Structure:
Code: Select all
<div id"container">
<div id"container">
<div id"headerBlock"></div>
<div id"center">
<div id"leftBlock">menu</div>
<div id"rightBlock">content</div>
</div>
<div id"footer"></div>
</div>
the center div.
My css:
Code: Select all
#container {
width: 760px;
\width: 780px;
w\idth: 760px;
border: 1px solid gray;
margin: 10px;
margin-left: auto;
margin-right: auto;
padding: 0px;
}
#banner {
padding: 0px;
margin-bottom: 0px;
height: 160px;
background: url(banner.jpg);
}
#mainBlock {
width: 760px;
background: url(bg_l_r.jpg);
}
#content {
padding: 5px;
margin-left: 200px;
height: 100%;
}
#menu {
float: left;
width: 200px;
\width: 200px;
w\idth: 200px;
margin: 0;
margin-right: 0px;
padding: 5px;
height: 100%;
}
#footer {
clear: both;
padding: 0px;
margin-top: 0px;
background: url(footer.jpg);
}