Jump to content

[Solved] How to change background colour on top menu and text block


Recommended Posts

I've just migrated to PS version 8.2.0 and for the most part I've got everything looking like I want, but I'm damned if I can figure out how to change the background colour of the top menu:

top-menu_circle.thumb.jpg.cc750d79a8930ac36eebae7158db567b.jpg

and text block:

text-block_circle.thumb.jpg.2675c6187fa24b51e0e9180bb960b945.jpg

I've searched everywhere in themes/classic/assets/css/theme.css and found all the other colours I wanted to change but I just cannot find the styles controlling the background colour of these two items. Can anyone point me in the right direction please? Is there another style sheet somewhere that I haven't found?

Edited by T-bird (see edit history)
Link to comment
Share on other sites

@T-bird

To change the background color of the top menu and text block, please follow these steps:

Step 1: 
Open the CSS file for custom styles, usually found at (If this file does not exist, create them.)
File Path: themes/{{your_theme}}/assets/css/custom.css

Step 2:
Paste the following code into the custom.css file

for the top menu background please add this CSS

#header, #header .header-top {
  background-color: #000033;
}

Note: Add the color you want to the background-color property.

Also, for the text block background please add this CSS

#custom-text {
  background: #000033;
}

Note: Add the color you want to the background property.

Step 3:
In your PrestaShop admin panel, go to Advanced Parameters > Performance, and click Clear Cache.

Step 4:
Visit the front end to confirm that the background color changed. Review the screenshot reference if needed.

We hope this solution works for you!
 

Link to comment
Share on other sites

Thank you. It worked for the text block, but not the header. I tried changing every instance of #header .header-top {
  background-color: #......;
} in theme.css (I'd rather change this than create a new custom one) but the header will not change colour.

Link to comment
Share on other sites

@T-bird

Okay, we reviewed your last comment regarding changing the header color via theme.css. Instead of creating a new custom CSS, kindly add the following CSS to the theme.css file

body #header .header-top {
    background: #000000;
}

After adding the CSS, make sure to clear the cache from the back office.
Then, visit the frontend to confirm that the header background color has been updated.
Hope this solution will work for you..!!

Link to comment
Share on other sites

On 11/27/2024 at 4:16 AM, WebDesk Solution said:

@T-bird

Okay, we reviewed your last comment regarding changing the header color via theme.css. Instead of creating a new custom CSS, kindly add the following CSS to the theme.css file

body #header .header-top {
    background: #000000;
}

After adding the CSS, make sure to clear the cache from the back office.
Then, visit the frontend to confirm that the header background color has been updated.
Hope this solution will work for you..!!

Thank you, that worked! I had to play around with it a bit but I finally got it to work.

Link to comment
Share on other sites

  • T-bird changed the title to [Solved] How to change background colour on top menu and text block

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