Jump to content

change image background in the Header depending on selected category


Recommended Posts

Hi,

I'm looking for help to change the image background in the Header depending on selected category

If someone know how to do it ?

I'm on prestashop 1.7.5.1

Best,

Olivier

Share this post


Link to post
Share on other sites

actually,

the css is like that

 #header {
  position: relative;
  min-height: 500px;
  background-image: url('.../assets/img/header_mysim.jpg');
  margin: 0 0 60px 0;
}

I'm not very familiar with CSS.

If you can explain me more ?

Appreciate.

Olivier

Share this post


Link to post
Share on other sites

Here is the solution.


 

.category-id-3 #header {
  
  background-image: url('.../assets/img/category1.jpg');
 
}



.category-id-4 #header {

  background-image: url('.../assets/img/category1.jpg');
  }

 

Share this post


Link to post
Share on other sites
  • 11 months later...

Please am a newbie!! Where did you find the css

#header {
  position: relative;
  min-height: 500px;
  background-image: url('.../assets/img/header_mysim.jpg');
  margin: 0 0 60px 0;
}

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More