The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Appying background to floating divs Re: [Solved] Appying background to floating divs


Got it! Alright, I took a look at the example and I finally have the body and branding sections working out just fine. The only div that is not lined up is the #container div and its contents. I’m at a paradox, how do I define the y-axis of where the #container div begins while simultaneously applying the margin: 0 auto rule?

Like I said, everything is checking out fine. Its just that the #container div is now sitting under some elements, whereas when it was an AP div it was exactly where I wanted it positioned vertically.

body {
background-attachment: fixed;
background-position: 0 0;
background-repeat: repeat;
margin: 0 auto;

#branding {
background-attachment: scroll;
background-image: url(navigation/mainBanner.jpg);
background-position: center -1px;
background-repeat: no-repeat;
margin: 0 auto;
height: 305px;

#container {
width: 1069px;
margin: 0 auto;