Link to home
Start Free TrialLog in
Avatar of nsitedesigns
nsitedesignsFlag for United States of America

asked on

background image grows with monitor size

How do I create a site that has a background image that grows with monitor size but doesn't get distorted PLUS it stays put?  I've done websites with backgrounds that don't move but never one that resizes.

Here is a perfect example.  
http://www.travelwisconsin.com/
Avatar of Carlos Llanos
Carlos Llanos
Flag of United States of America image

Just make the background image ridiculously huge...that's what they did on that website...

The image size is: 2000px wide by 1200px high.  It's positioned in the upper-left hand corner of the screen so it never moves...
SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nsitedesigns

ASKER

won't that mean it will take a long time to load on slower connections?
Not if you optimize the image...if you keep the image file size down it will still load fast like the web url you provided.

Photoshop does a great job in letting you know which format is the best for optimization...generally jpg.
Is there a size that I should not exceed?  What is the biggest I should shoot for?
I would say 2400 wide...there aren't too many that exceed that...for now...
Their background image is 315kb - I wouldn't say that is optimized!
GaryC123,

Your option of Grow Media seems to be the most browser friendly.  

http://growmedia.ca/blog/2009/10/14/resizable-full-browser-background-image-with-jquery-preserving-aspect-ratio/

The other options provided by other experts were interesting but some had browser limitations or were not optimized, or were a slideshow and I didn't need a slideshow.

I tried it but could not get my sample page to display image.  I do not know js.  Would you be willing to take a peek to see what I did wrong?  If you can fix it, I will award you the points.

http://plymouthwisconsin.com/3.html
http://plymouthwisconsin.com/3.css
http://plymouthwisconsin.com/3.js
HOLD THE PHONE!  One of the links that I failed to try earlier seems to work pretty good!

http://css-tricks.com/examples/FullPageBackgroundImage/css-1.php#

I am now testing it on browsers.

http://plymouthwisconsin.com/4.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
nope  - - didn't work.
http://plymouthwisconsin.com/3.html
 

I am now testing 4.html in browsers.
Well, your js is failing because you have numbers before the code...

remove the 1,2,3,4,5 -- 39 before the code...then it might work.
Good catch.  I removed the numbers but it still fails.  Big fat white screen.
http://plymouthwisconsin.com/3.html


I tested 4.html and it doesn't test well.  So I am back to troubleshooting 3.html
http://plymouthwisconsin.com/4.html
Can you post the image you are using too?
here you go.
lets try this again....
back-leaves-fall.jpg
weird, my file name is actually back_leaves_fall.jpg but after I uploaded it, it converted the underscores to dashes.
Ok, this is working for me...unzip and replace your other files...
package.zip
I tried clicking on the package.zip link and it opened new blank window.  Tried dragging zip file to desktop and opening it but it was blank too.  DId i do something wrong?
You have to save the zip file to a place on your computer...then unzip the zipped file to where you have the same files on your web server...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nukit,

I have another question open regarding this coding.  Please take a peek and let me know if you can help me.  The subject is "background image that grows positioning".  Another opportunity for more points!
Yeah, I think you closed this question, without handing out the points correctly.  Instead of closing it you should select who's solution was the answer to your problem...then it will auto close it out...but now we get less points...oh well.
I assigned a best answer (you) and then 2 supporting answers (you and Gary).  Not sure why question didn't close out.  I closed it like I normally do....

I opened a NEW question on  this coding and thought you would be able to help me out.
thanks all!