Forums / Templates, Stylesheets, Page Layout / add image to #indexDefaultMainContent.content

add image to #indexDefaultMainContent.content

Locked

Views: 964

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
9 Sep 2009, 2:23 AM
#1
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

add image to #indexDefaultMainContent.content

Hi Just started playing with ZC, I am using 1.3.8. Have done a few cosmetic changes, like changing the width of the shop, swapped the nav to below the Header and added a new image to the Header.
What I am wanting to do now is add a background image to #indexDefaultMainContent.content. Using FF web dev tools it has given me the name of div but I can't seem to work out how in the CSS to add a background image and which directory to put the image in.
Can someone please point me in the right direction :smile:

Thanks

9 Sep 2009, 3:24 AM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: add image to #indexDefaultMainContent.content

Well done for finding the ID of the div. Being able to do that is going to be sooooooo useful.

You can put the image anywhere you like but the images folder is as good a place as any. Then simply link to it in the css using a rule like:

#indexDefaultMainContent{background: url(Path to image) no repeat top right;}

Have a look at
http://www.w3schools.com/css/css_background.asp to understand how this rule works.
If you have put the image in the images folder then the path to the image is going to be something like ../images/myimage.jpg.

Nick
iszent.com

18 Sep 2009, 4:19 AM
#3
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

Re: add image to #indexDefaultMainContent.content

Thanks, got it working :bigups: