Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Background image for site...

Background image for site...

Locked

Views: 825

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
29 Sep 2010, 6:26 AM
#1
injected avatar

injected

New Zenner

Join Date:
Jan 2008
Posts:
41
Plugin Contributions:
0

Background image for site...

Hi, I would just like to know if any of you can help me with a background problem. My site (http://howyoulikemenowclothing.com/store/) has white sides right now, and presumably a FFFFFF colored background. I'm just wondering how I can create a background that will always be fixed? Here's an example of what I'd like:

http://img412.imageshack.us/img412/6429/60228691.jpg

So what I can do, is make a background that's 1680 x 1050 res, and I'd like it to be forced to always be 100% no matter what people's resolutions are, and sort of force it self with the rest of the site. How can I accomplish this?

Thanks

29 Sep 2010, 4:16 PM
#2
leest35 avatar

leest35

Zen Follower

Join Date:
May 2010
Location:
London UK
Posts:
134
Plugin Contributions:
0

Re: Background image for site...

The problem is going to be resizing the image, making a background fixed is fine but i am not sure you could resize an image without loosing quality.

29 Sep 2010, 4:26 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background image for site...

You can't resize a background image dynamically with CSS. Perhaps javascript could detect the window size and serve an appropriate version of the bg image file...

29 Sep 2010, 5:48 PM
#4
fusionsp avatar

fusionsp

Zen Follower

Join Date:
Jun 2008
Posts:
204
Plugin Contributions:
0

Re: Background image for site...

gjh42:

You can't resize a background image dynamically with CSS. Perhaps javascript could detect the window size and serve an appropriate version of the bg image file...

Well what about using percentages instead of using fixed? on an old template i used "width:90%" for example to state the width of my page to dynamically adjust to what ever screen resolution a person was using so that my page wouldnt have too large spacing on higher resolutions.

29 Sep 2010, 5:59 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Background image for site...

The percentage width will resize whatever class or id it's applied to, but can't resize an image.

5 Oct 2010, 4:46 PM
#6
injected avatar

injected

New Zenner

Join Date:
Jan 2008
Posts:
41
Plugin Contributions:
0

Re: Background image for site...

Alright, well this seems a little too tedious.

Is there a way I can just make a repeating tile image be the background? I tried setting an image to be the bg under #navMainWrapper, but it just worked for the middle area, and in a very strange messed up way.

I'd like it to cover the outside of the middle area. How do I accomplish this?

http://www.howyoulikemenowclothing.com

5 Oct 2010, 5:16 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background image for site...

Give the background to the body {} rule.

5 Oct 2010, 5:59 PM
#8
injected avatar

injected

New Zenner

Join Date:
Jan 2008
Posts:
41
Plugin Contributions:
0

Re: Background image for site...

That worked great, thanks!