Forum Moderators: not2easy

Message Too Old, No Replies

How to create a non-scrolling, centered, oversized image?

oversized image

         

HullBreach

9:26 pm on Dec 21, 2003 (gmt 0)

10+ Year Member



Pardon me if this is the wrong section of the forum, but it appeared to be the most appropriate.

Im building a site using CSS, and I have a large background image that displays behind all three columns of the page. Its a very wide image, and Id like it to center behind all of the other elements at its full size regardless of the browsers resolution. Herein lies the problem: I dont want scrolling, and I still want the image to be centered in such a manner that a low-res veiwer will have a portion of the image that is cut off on both sides of the page.

Does anyone know how to do this, or if its even possible?

DaScribbler

10:35 pm on Dec 21, 2003 (gmt 0)

10+ Year Member



This thread will probably be moved to the CSS forum...but here's something for ya...

Add this CSS to your page...

body { background-position: 50% 50%; background-repeat: no-repeat; background-attachment: fixed; }

HullBreach

11:34 pm on Dec 21, 2003 (gmt 0)

10+ Year Member



Worked like a charm! Thanks for saving me a few more gray hairs!