Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding a pic to main background instead of color

Adding a pic to main background instead of color

Locked

Views: 2,094

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
12 Jun 2009, 6:00 AM
#1
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Adding a pic to main background instead of color

I searched and could not find the answer. Can someone please advise how to add a picture in the main background instead of a color.

Thanks!

12 Jun 2009, 12:16 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Adding a pic to main background instead of color

You'd do that in the stylesheet with the background-image statement, in #mainWrapper if you mean the center section, or in #body for the whole page.

12 Jun 2009, 1:22 PM
#3
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Ok, yeah I'm talking about the background behind the cart, so I'm guessing that s the body?

Anyway you could show an example code of what it would look like?

Thanks

12 Jun 2009, 2:08 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Adding a pic to main background instead of color

BODY {
background-image: url(../images/someimage.jpg);
background-repeat: repeat;
background-color: #FFFFFF;

}

If it's just one big image, you won't want the repeat part.

19 Jun 2009, 8:50 AM
#5
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Thank you.

Now how do I make the picture the entire background instead of multiple repeats of the pic? Does the pic have to be a certain size?

20 Jun 2009, 3:13 AM
#6
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

EAPerformanceParts:

Thank you.

Now how do I make the picture the entire background instead of multiple repeats of the pic? Does the pic have to be a certain size?

Anyone?

20 Jun 2009, 9:02 AM
#7
stevesh avatar

stevesh

Black Belt

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

Re: Adding a pic to main background instead of color

It would have to be as big as the size of the highest resolution monitors viewing it, if it's one big image.

I don't think you want anything too interesting back there, as it will draw visitors' eyes away from the stuff you want them to buy.

The diamond plate image you have there now looks good to me.

20 Jun 2009, 10:58 AM
#8
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Thanks, I was just thinking of having one picture instead of the repeat. Just wasn't sure if there was a specific code to do so.

I would like to keep the diamond plate I have now, I've just seen other sites with one consistent background picture and was thinking that may look better.

Either way no biggie. Thanks for your time, and if there is a way to do it with my current setup, please let me know.

Heres an example I found, not sure how different this is.

ktperformance.net

22 Jun 2009, 10:21 PM
#9
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Did you check the example I gave? How can I make it like that?

Thanks

24 Jun 2009, 3:40 AM
#10
ciriusrizk avatar

ciriusrizk

New Zenner

Join Date:
Jun 2009
Posts:
12
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

I'm trying to do the same thing and I have a follow-up questions please.

BODY {
background-image: url(../images/someimage.jpg);
background-repeat: repeat;
background-color: #FFFFFF;

}

On my FTP server..where do I upload "someimage.jpg"

thanks!

24 Jun 2009, 5:38 AM
#11
z3nn3d avatar

z3nn3d

New Zenner

Join Date:
Jun 2009
Location:
Porthleven, Cornwall, UK
Posts:
43
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

CiriusRizk:

On my FTP server..where do I upload "someimage.jpg"
thanks!

You upload the image to the images folder in your template directory

24 Jun 2009, 7:18 PM
#12
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Anyone have the code to make the pic background one complete picture instead of a bunch of repeats?

24 Jun 2009, 9:19 PM
#13
ciriusrizk avatar

ciriusrizk

New Zenner

Join Date:
Jun 2009
Posts:
12
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Thanks Z3NN3D

I appreciate your response and it answered my question.

Cirius

25 Jun 2009, 4:12 AM
#14
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

Seems hard to get an answer for this, but I see tons of sites with what I;m trying to do.

Heres a code from a site with something similar to what I'm looking for, not sure how to do this.

var reimg_maxWidth = 740, reimg_maxHeight = 740, reimg_relWidth = 0;
			var reimg_swapPortrait = true;
			var reimg_zoomImg = "./images/spacer.gif";
		var reimg_zoomStyle = "width: 20px; height: 20px; background: url(./styles/diesel/imageset/icon_reimg_zoom_in.gif) top left no-repeat; filter: Alpha(Opacity=50); opacity: .50;";
		var reimg_zoomHover = "background-position: 0 100%; cursor: pointer; filter: Alpha(Opacity=100); opacity: 1.00;";
		var reimg_zoomAlt = "Zoom in (real dimensions: %1$d x %2$d)";
		var reimg_zoomTarget = "_litebox";
	
function reimg(img, width, height) { window.reimg_version ? reimg_resize(img, width, height) : null; }

Heres a couple sites I'm talking about:

afterhoursdiesel.com

ktperformance.net

Someone pls advise me how to accomplish this.

26 Jun 2009, 5:00 AM
#15
eaperformanceparts avatar

eaperformanceparts

Zen Follower

Join Date:
Jun 2009
Posts:
100
Plugin Contributions:
0

Re: Adding a pic to main background instead of color

^^^^^

Anyone??

26 Jun 2009, 5:16 AM
#16
Kim avatar

Kim

Obaa-san

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

Re: Adding a pic to main background instead of color

Why? That big image is 378.4 KB (387479 bytes) - you know how long that takes to download? You are much better off with a small tiled image.