I want the outer div to span to all the page width with the background color #efefef.
The inner div will be centered and have white background with 995px width.
So i have this code:
<div style="background-color:#efefef;width:100%;">
<div id="photoUploadWrap">
Now the photoUploadWrap style is:
#photoUploadWrap{width: 995px;margin: auto;}
And it has tables and more divs inside it. The div gets centered alright but the
outer div doesn’t display the #efefef background.
What’s wrong here? I also tried to put a border on the outer div with no success.
The outer div has no height (or at least the browser doesn’t think so). This is why you don’t see the border or the background color. Why not just set the background color on the body tag?