Here is my code...
Code:
body{
background: #ccc;
}
#wrapper{
margin: 0 auto 0 auto;
background: #fff;
}
#content1{
float: left;
}
#content2{
float: left;
}
<div id="wrapper">
<div id="content1"></div>
<div id="content2"></div>
</div>
I want to color my wrapper with white, so that divs inside the wrapper will have a white background. But my divs need to be floated to left. Whenever I assign float: left to my content1 and content2 divs, they get no colors. Only the divs that are not floated gets the white colors as background...
I tried floating the wrapper to left... it worked and wrapper could get filled with white... but since the wrapper is floated to left.. it is no longer in the page center..
I want to place the wrapper in the center of the screen and with white background .. How can I accomplish this?
Last edited by doer; 01-07-2008 at 01:40 PM..
|