+ Reply to Thread
Results 1 to 4 of 4

Thread: Stretching a background image?

  1. #1
    WhiteOut is offline x10 Sophmore WhiteOut is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    111

    Stretching a background image?

    How do you stretch a background image? I only want to stretch the width of my background image. Any help is appreciated.

    Thanks!

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Stretching a background image?

    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 by garrettroyce; 03-28-2009 at 09:48 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    akkudreamz's Avatar
    akkudreamz is offline x10 Sophmore akkudreamz is an unknown quantity at this point
    Join Date
    Jan 2009
    Location
    Jaipur, Rajasthan, India
    Posts
    183

    Re: Stretching a background image?

    Be safety conscious. 80% of people are caused by accidents.
    My Weblog

  4. #4
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Stretching a background image?

    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.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 03-12-2009, 12:54 AM
  2. Fixed background image
    By stalkio in forum Programming Help
    Replies: 3
    Last Post: 07-26-2008, 10:41 AM
  3. Hmm background image help.
    By Matt. in forum Programming Help
    Replies: 3
    Last Post: 07-21-2008, 01:43 PM
  4. errors while attaching
    By mattspec in forum Feedback and Suggestions
    Replies: 0
    Last Post: 12-19-2005, 01:50 PM
  5. November Desktop
    By n4tec in forum Off Topic
    Replies: 12
    Last Post: 11-08-2005, 07:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers