Forums / Templates, Stylesheets, Page Layout / New header_bg.jpg for certain product pages

New header_bg.jpg for certain product pages

Locked

Views: 688

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 Oct 2008, 4:05 PM
#1
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
416
Plugin Contributions:
0

New header_bg.jpg for certain product pages

Hi, how would it be possible to show a different background image (header_bg.jpg) in the header of different product info pages?
For example on this page I want to keep the existing header:

http://www.usconverters.com/index.php?main_page=product_info&cPath=65&products_id=180

but on this page I want to show a different header image:

http://www.usconverters.com/index.php?main_page=product_info&cPath=66&products_id=216

:blink:

14 Oct 2008, 4:14 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: New header_bg.jpg for certain product pages

Probably the best way to do this is to create PAGE SPECIFIC stylesheet(s).

Inside the stylesheet folder is a readme file explaining how to set up page-specific stylesheets.

You would create an identical stylesheet to "stylesheet.css", then re-name it to suit the page, and simply edit the image reference to the background image of your choice.

14 Oct 2008, 4:50 PM
#3
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: New header_bg.jpg for certain product pages

To expand a bit on fairestcape's post;

you would create a new stylesheet named

p_216.css

in this new stylesheet you only need to include the following declaration. change the highlighted portion to show your new header image.

#logoWrapper{

background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
height:100px;
}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

14 Oct 2008, 5:06 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: New header_bg.jpg for certain product pages

Thanks Clyde...

... of course, only necessary to change the single declaration as this will load AFTER stylesheet.css and overwite the initial declaration - everything else is inherited! :blush:

14 Oct 2008, 5:56 PM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: New header_bg.jpg for certain product pages

fairestcape:

Thanks Clyde...

... of course, only necessary to change the single declaration as this will load AFTER stylesheet.css and overwite the initial declaration - everything else is inherited! :blush:

Correct, anytime you use a per page stylesheet you only need to include those declarations that are necessary to change that page.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.