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

Background image for site

Locked

Views: 2,593

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
10 Sep 2006, 1:25 AM
#1
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Background image for site

Hi, please can i have help on changing the colour background to a simple pattern background. I want to use the pale blue (main_bg.gif) on the website https://www.earlcraftncake.com and use it on https://www.earlcraftncake.com/cart.
I have been playing around for ages and just cant get the code right in the stylesheet, thanks Rod

10 Sep 2006, 1:35 AM
#2
Kim avatar

Kim

Obaa-san

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

Re: Background image for site

Copy the image to YOUR_TEMPLATE/images/

Add to your stylesheet under the BODY selector:

background-image: ur(../images/main_bg.gif);

10 Sep 2006, 2:01 AM
#3
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: Background image for site

Um I still havnt got it right, could you please correct the section for me.

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
background-image: url(....images/main_bg.gif);
}

Thanks, Rod

10 Sep 2006, 2:26 AM
#4
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

just copy and paste this over your body rule:

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
background: url(../images/main_bg.gif) repeat;
background-attachment: fixed;
}

10 Sep 2006, 2:33 AM
#5
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

and to get ahead of your next question:yes: use the following lines in the #logoWrapper and #mainWrapper rules:

background: url(../images/main_bg.gif) repeat;
background-attachment: fixed;

This will place the background like on your other page:D

10 Sep 2006, 3:22 AM
#6
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: Background image for site

Thanks Kim and Barco57, but still no joy. not sure about the #mainWrapper and logoWrapper rules though. i lost my logo ( restored back to before) here are the three sections discussed from my stylesheet

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
color: #000000;
background-color: #e5edf5;
}

#logoWrapper{
background-image: url(../images/header_bg.jpg);
background-repeat:no-repeat;
/background-repeat: repeat-x;/
background-color: #ffffff;
height:75px;

#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 750px;
vertical-align: top;
}

Oh , also i am a little bit confussed with the url section, do i type in my full path of url(http//www.........etc/images/main_bg.gif); or is it left with the two periods url(../images etc) Thanks , rod

10 Sep 2006, 3:42 AM
#7
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

:cry:

do you want solid background or the grid pattern?

If you want the grid pattern then the body rule I posted works. Tested in firefox w/webdeveloper which lets me change your stylesheet dynamically and see the changes, so I know I can get the grid on the page background:yes:

10 Sep 2006, 3:46 AM
#8
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: Background image for site

Thanks barco57, yes i want the grid pattern, could you give a little more info on the stylesheet changes, thanks Rod

10 Sep 2006, 3:56 AM
#9
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

you currently have:

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;

color: #000000;
background-color: #e5edf5;

}

you want it to be like this exactly:

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;

background: url(../images/main_bg.gif) repeat;
background-attachment: fixed;

}

items in green leave alone.
items in red need to be changed from what you have to what I have.

and yes url(../images/main_bg.gif) is the correct way to point to the images:yes:

got it?

10 Sep 2006, 4:13 AM
#10
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

I think I screwed up:blush: the line should be:

background-image: url(../images/main_bg.gif);

I added the "-image" and removed the "repeat" at the end. the image will automatically repeat.

10 Sep 2006, 4:17 AM
#11
rocketrod avatar

rocketrod

New Zenner

Join Date:
May 2006
Location:
Australia
Posts:
94
Plugin Contributions:
0

Re: Background image for site

No barco57 it works, thaks heaps, your are elevated to Guru ( for the week at least) Rod

10 Sep 2006, 4:19 AM
#12
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Background image for site

:lookaroun thanks don't tell anybody......They say I like to break things......gotta go I hear linda coming:cool: