Forum Moderators: not2easy
I have a div inside a div that looks fine, until I add a float:left to the inner div (in order to create a 2 column layout inside the container). There are four levels of nested divs, but the outer two just have a margin and width specified.
This works fine
<div id="content_center">
<h1> The Science Of Dating Is Different </h1>
<p>
</p>
<div id="main_content">
</div>
</div>
#content_center {
background: #ffffff url("/images/content_center.png") repeat-y scroll right center;
padding: 5px 40px 5px 40px;
}
#main_content {
width:620px;
}
Changing to this removes the content_center styling as the browser closes up that div.
#main_content {
width:620px;
float:left;
}
Anybody have any ideas what I'm doing wrong? Or even where to start?