Stretching a background image?

WhiteOut

New Member
Messages
111
Reaction score
0
Points
0
How do you stretch a background image? I only want to stretch the width of my background image. Any help is appreciated.

Thanks!
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
As far as I know, there is no way to do this using CSS, which is what I believe you are using to display this background. The only option that is given is to repeat the background until it fills the screen (in x, y, or both).

Stretching may not be the best option, considering there are some very wide screen high resolution monitors out there that could double the width of your image and distort it a lot. The maximum I found for a monitor width is 2560px. If your image can't stretch a normal 1024px you have to stretch it 1.5 times it's normal width.
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
That is a viable solution I should have mentioned, but I personally try to avoid dependency on the z-index and floating. Not to mention there's still the problem of stretching an image 150%. All in all, I'd say a website using this technique would only look correct to 75% of the users viewing it.
 
Top