3 replies [Last post]
peapod_grrl
Offline
newbie
Last seen: 16 years 44 weeks ago
Joined: 2004-01-29
Posts: 2
Points: 0

I want to put a full size image, ie, an image that will wholly fill out the browser flush to the borders, and i want it to appear that way no matter what the resolution. I can slice it later and put it in a table, but in testing it its not working. does anybody have any code I can use?

thanks so much.

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 17 years 5 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

Please help me. :)

It's not quite that easy. You can use a background image
on the 'body' element, but at spall screen sizes much of
the image will be outside the screen edges.

Or you could put an image directly into the body and give
it a width of 100%, followed by a wrapper div that is absolutely
positioned over the entire body, but at most screen sizes the
image would be distorted wider or narrower than normal.

http//www.positioniseverything.net/

peapod_grrl
Offline
newbie
Last seen: 16 years 44 weeks ago
Joined: 2004-01-29
Posts: 2
Points: 0

hi big John

thanx for the info. Smile to be honest, i dont care if some of the image is cut off on some browsers, just as long as it goes flush to the borders. and i can live with a certain amount of distortion.

how would i do either of these things, exactly, codewise?

here is the culprit page:

www.peapoddesign.net/sloan/splash.html

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 17 years 5 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

Please help me. :)

In your css:

body {background: url(backgroundimage.jpg) no-repeat;}

If you don't want the BG image to scroll with the rest of the page:

body {background: url(backgroundimage.jpg) no-repeat fixed;}

http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background

The image path between the parentheses is relative to the stylesheet,
NOT the HTML page, so if they are in different folders you need
to be careful not to get it wrong. Also the image must be huge
unless you let it repeat so it can tile the screen.

http//www.positioniseverything.net/