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


Thanks virtual and cram! It looks like all I needed to do was add the overflow rule to the content_wrapper div, both hidden or auto worked! One more question…

On that same page, I have a banner (masthead) that spans 1920px, but I don’t want the user to see a horizontal scroll bar if their resolution is smaller than that. So I added the rule overflow : hidden and it got rid of the horizontal scroll bar. The only problem remaining is that the page opens up on the left side, but the design is centered. How do I apply a rule to the body so that the page opens centered in the browser window and not align left?

PS. Cram I should know better to name my code using the content approach and not the visual approach, especially since I’m reading Transcending CSS! I’ll fix that habits soon enough.


body {
position : relative;
width : 1920px;
margin : 0 auto;
text-align : left;
text-align : justify;
overflow : hidden;