Jump to content

different background for each page


Recommended Posts

Hi all,

 

I'm working on the Prestashop standard theme. I was wondering if it's possible to have a different background in each page of the website. I understand it's possible to modify the CSS to have specific colours in body/header/footer/etc. However ideally I would like to have something like:

shoes > pink background

t-shirts > image.jpg

belts > blue background

 

and so on. I'd be even better if it was possible to have a different colour for some specific product pages.

 

Thanks in advance for your help.

 

Link to comment
Share on other sites

It is possible but depending on amount of products could be too much to add different color/image to each product.

But it can be done by products and by category. For example if you view source of product page you will see 

<body id="product" class="product product-1 product-faded-short-sleeve-tshirts category-5 category-tshirts hide-left-column hide-right-column lang_en">

there you have few classes that could help, product-1 is with ID , product-faded-short-sleeve-tshirts with friendly-url and similat to categories classes : category-5 category-tshirts. So you can style like this

body#product.product-1 {background: pink}

body#product.product-faded-short-sleeve-tshirts {background: url('../img/product-bg.jpg')}

body#product.category-tshirts {background: blue}
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...