Copy link to clipboard
Copied
I would like to be able to disable horizontal scroll on the background image:
http://www.elliotnewman.com/index/test5.html
like this page:
http://www.steininger.com.au/purchasing.html
I tried looking though the source but could not find where it controls this...
Copy link to clipboard
Copied
body { background-attachment:fixed; }
Be aware that your background would have to tile properly to make this look right (note the visual repeat in the background on your linked page).
Copy link to clipboard
Copied
Hmmmm.... thats cool, but this is not quite what I am after. I don't
want the image to repeat, I only want there to be H-scroll bars
appearing when the window is reduced past the width of the main image
(or the main content divs) - not when it passes the width of the
wrapper.
So to summarise I don't want the scroll bars to care about the wrapper
div if the browser window cannot fit it in... I also don't want the
centering of the page to be based on the wrapper div, so when you
reduce the browser size everything inside the wrapper div remains
centered even though the wrapper has cropped some width.
Does that make sense?
Maybe it's a simple case of taking the wrapper div out of the context
of the rest of the page, and tell it never to have scroll bars. Then I
would have the centering the way I want it too?
- E
Copy link to clipboard
Copied
I don't
want the image to repeat, I only want there to be H-scroll bars
appearing when the window is reduced past the width of the main image
(or the main content divs) - not when it passes the width of the
wrapper.
Sounds like you would want an arrangement such as this -
Body - uniform background color with background image that centers using background-position:center.
Wrapper - fixed width, centering containing body content.
Is that what you are looking for? The wrapper will always center in the browser, as will the background image behind it. Horizontal scrollbars will only appear when the viewport width is less than the wrapper width.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now