Horizontal scroll on center div

Ariana_Ohio

New Member
I have a question regarding simple HTML and CSS.First, look at this illustration:
W2D9C.jpg
I am making a page with multiple background images, each having the width: 1600px (blue, pink and green on the picture).The main area of the page (yellow) is centered (margin: 0 auto;) and have the width: 800px.I want it to be so, that the browser-horizontal-scrollbar only appear, if the browser window is smaller than the center area (800px).Any ideas how to do this ?Thanks for any help and sorry about the awfull layout and colors ;)Edit:What i did so far:i have tried to make the tyupical center div in wrapper:\[code\]<div id="wrap"> <div id="child">\[/code\]\[code\]#wrap{ width:1600px; }#child{ width: 800px; margin: 0 auto;}\[/code\]However, naturally the scrolls appear as for the entire wrape div, i have no idea what to do from here?
 
Back
Top