Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / change background on either side from a colour to an image?

change background on either side from a colour to an image?

Locked

Views: 2,124

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Jun 2007, 2:30 AM
#1
highlander avatar

highlander

Zen Follower

Join Date:
May 2007
Posts:
125
Plugin Contributions:
0

change background on either side from a colour to an image?

How do I change the background on either side of my page to an image instead of just a colour?

https://www.mccarthyhighland.com/shop

1 Jun 2007, 2:50 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

What sort of image?

1 Jun 2007, 7:02 AM
#3
zas avatar

zas

Zen Follower

Join Date:
Oct 2006
Posts:
138
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

this is what you need to change, will need to take out background colour and place in image. Exact code I am not sure of unless I played with it.
https://www.zen-cart.com/tutorials/index.php?article=201

1 Jun 2007, 12:05 PM
#4
highlander avatar

highlander

Zen Follower

Join Date:
May 2007
Posts:
125
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

Kim, I have a background gif, the kind you tile to fill the space, that I'm considering using.

Zas, could you let me know what the code should be for me to do this? I'm running out of time to get this site up and running, and I don't know enough about CSS coding to handle this yet.

Thanks ,

Highlander

1 Jun 2007, 3:07 PM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: change background on either side from a colour to an image?

In your stylesheet

body{
background-image: url(/includes/templates/custom/images/bg.gif);
}
4 Jun 2007, 2:01 AM
#6
highlander avatar

highlander

Zen Follower

Join Date:
May 2007
Posts:
125
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

thanks. I trid the code you supplied, but the image didn't show up? The background just changed to white? Do I need to do something for the image to "tile" and fill in all the available space around the central "page"?

4 Jun 2007, 3:24 AM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

Try putting your image in the line I've higlighted in red. Pick a background color close to the main color in your image and replace the black that I have (000000).

#mainWrapper {
	background-color: #000000;
  background-image: url('../images/space011.jpg');
	text-align: left;
	width: 100%;
	vertical-align: top;
	}
5 Jun 2007, 11:58 AM
#8
highlander avatar

highlander

Zen Follower

Join Date:
May 2007
Posts:
125
Plugin Contributions:
0

Re: change background on either side from a colour to an image?

Thanks! I discovered by playing around that your chunk of code needs to be in the " body { " portion of the stylesheet. Works fine......but I didn't like the background image afterall.