How do I set the background colour to black when header details are shown?

Hi, I’m having a problem setting the background of the header. Currently the header is set to turn black on hover and scroll down when it is originally transparent.
This is fine so far, but when the SUMMARY of the detail is expanded and the mouse leaves the area, it loses the hover effect and becomes transparent again.
How can I ensure that the background of the header stays black even when the summery is visible?

Here’s a link to the preview.
I’m using the dawn theme!

https://kp26oqao5mnfsz8j-86858006827.shopifypreview.com

Hi @zenir_official ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Hi @zenir_official

You can try to add this code to your theme.liquid file, after in Online Store > Themes > Edit code and check again


1 Like

code is working very well, thank you!

1 Like

Very welcome

1 Like