PDA

View Full Version : Image overflow not make scroll?



soaringchicken
17 Feb 2010, 02:46 AM
Hello all, I have a challenge that I would be extremely happy if someone could solve.

My goal is to have the background image on my page (could be a background or lower layer div) act like a background in that it wont create scrollbars if the window is shrunk beyond the size of most of the image, but I would also like it to act like a div so that once the page is shrunk to a certain point it stays centered with the rest of the upper layers.

Another way to think of this is that I would like to make my background image appear to browsers to have an actual size which is smaller than the total size so that the borders can be cut off when shrinking the page but that once the page gets small enough DOES create a scrollbar.

My attempts at this involved putting the image (1122x900) in a div which is (800x600) and setting the div to overflow:visible. The obvious problem with this is that the parts of the image which go beyond the div, create scrollbars once the page is shrunk below that size.

Any ideas how to do this? I might be able to put work in progress page up if necessary.

Thanks a ton

Alex