Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Apply a different image background for the home page only?

Apply a different image background for the home page only?

Locked

Views: 1,582

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
13 Nov 2009, 4:19 PM
#1
arniesbarmyarmy avatar

arniesbarmyarmy

New Zenner

Join Date:
Aug 2009
Posts:
40
Plugin Contributions:
0

Apply a different image background for the home page only?

Hi guys, I would like to use a different background for the home (main) page only. Any ideas what the best way of doing this is?

I've been trying to change it in the stylesheet - no luck.

And I've tried using a new stylesheet, which I am calling in the define_main_page.php with ```

<link rel="stylesheet" type="text/css" href="home_page.css"> ```

When I tried naming it stylesheet_home.php, it applied the new background to all the pages rather than just the home page.

So if using css is correct, can someone please help me with the name of the stylesheet, which folder the stylesheet and jpg background image needs to be in and what line of code needs to be put in the define_main_pages.php to call the stylesheet???

Many Thanks

13 Nov 2009, 6:02 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Apply a different image background for the home page only?

From another thread somewhere around here...

"The home page body has an id #indexHome, so you can preface any element with that for a homepage-specific style rule."

Rob

13 Nov 2009, 6:36 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Apply a different image background for the home page only?

While you can use page-specific stylesheets for other pages, I understand that an index (home) page stylesheet isn't possible.

Rob is on the right track...