views:

2145

answers:

2

Duplicate of:

Stretch and Scale CSS Background
How do I stretch a background image to cover the entire HTML element?
background image doesn’t stretch full page width

I've got a webpage background image, which needs to be displayed fully at 100% of the window's size. If the window is resized, the image needs to resize with it, to stay at 100%.

CSS does not allow you to set the sizes of the background image, only the way it repeats. (but I want it stretched)

I assume jQuery is the safest and quickest way of realizing this, to overcome browser-incompatibleness. Or can this be done quickly with regular javascript?

+6  A: 

This link might interest you:

How Do you Stretch a Background Image in a Web Page

VVS
Alltough it uses conditional <!--[if IE 6]> stuff, it does the job with only CSS. Nice.
Gerrit
+1  A: 

Check this option using jQuery http://www.buildinternet.com/project/supersized/

little Catwalk