Log in

View Full Version : RESOLVED: image always sized/scaled to body



brentnicholas
12-20-2007, 10:58 PM
Howdy all,

I'm stuck on a few things on this site I'm building. I'll address them one at a time however.

Firstly, how can I make the background image I have automaticly scale to the same size as the bowser window as it resizes? Right now the image just shows up bigger than the window and goes out of frame. Smaller ones tile.

I'm not stuck to keeping the image in the 'body' selector, but I tried putting it in a div that wrapped all content and couldn't figure out how to make that work either.

I'm using:


body {
height:100%; /* fix height to 100% for IE */
max-height:100%; /* fix height for other browsers */
overflow:hidden; /*get rid of scroll bars in IE */
padding:0; /*remove padding */
margin:0; /* remove margins */
border:0; /* remove borders */
background-image:url(../images/GreenBeams.jpg);
}

Thoughts?

Thanks,

BN

brentnicholas
12-21-2007, 06:20 PM
I figured it out...

see: http://www.cssplay.co.uk/layouts/background.html