Make underlying content of menu drawer blurry and slightly black shaded

Solved

Make underlying content of menu drawer blurry and slightly black shaded

AnSrSi
Excursionist
31 1 15

Hi there,

Defaultly the menu drawer of my craft theme was of full width but I changed it to only 70%.

Now when the menu is opened there is no visible seperation between the menu and the underlying content which is not suitable for the website. So I need the underlying content to be blurry and a slightly black tinted when the menu is open.

Untitled design.png

 

Website - https://www.valcoure.store/

password - kothavara

 

Someone please help me with this.

Thank You.

Accepted Solution (1)

tim
Shopify Partner
4724 578 1706

This is an accepted solution.

This code should go to "Theme settings" => "Custom CSS"

body[class*=overflow-hidden] main {
  filter: blur(2px) brightness(0.75);
}

Screenshot 2025-05-17 at 2.31.18 AM.png

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 13 (13)

tim
Shopify Partner
4724 578 1706

This is an accepted solution.

This code should go to "Theme settings" => "Custom CSS"

body[class*=overflow-hidden] main {
  filter: blur(2px) brightness(0.75);
}

Screenshot 2025-05-17 at 2.31.18 AM.png

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
AnSrSi
Excursionist
31 1 15

Thank You So much

Moeed
Shopify Partner
7705 2070 2550

Hey @AnSrSi 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
body[class*=overflow-hidden] main {
    filter: blur(4px) brightness(0.75) !important;
}
</style>

RESULT

Moeed_0-1747415392803.png

 

If I managed to solve your problem then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


AnSrSi
Excursionist
31 1 15

Thank You So much

 

Moeed
Shopify Partner
7705 2070 2550

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


tsukiyo
Tourist
7 0 0

Hi, sadly didn´t work for me. I have the hoverable menu code, could that be why it doesn´t work? (www.tsukiyo.de)

tim
Shopify Partner
4724 578 1706

The code would work for drawer menu on mobile. Your drawer is full-bleed and covers entire window/screen, so you can't see the effect.

If you want to blur the page on desktop, the code should be like this:

body:has(header [open]) main,
body:has(header [open]) footer {
  filter: blur(2px) brightness(0.75);
}

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tsukiyo
Tourist
7 0 0

thanks for the reply, but i somehow can´t save it when i´m inserting it in custom css. 

tim
Shopify Partner
4724 578 1706

Yes, this can be picky. There is a workaround -- add a "Custom liquid" section in Footer section group and paste the code wrapped with <style> ... </style> there:

<style>
 body:has(header [open]) main,
 body:has(header [open]) footer {
  filter: blur(2px) brightness(0.75);
 }
</style>

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tsukiyo
Tourist
7 0 0

thank you, but here exactly? Code -> New custom liquid, but to which asset?

tim
Shopify Partner
4724 578 1706

Nope, in Customize.

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tsukiyo
Tourist
7 0 0

so custom CSS in theme settings?

tim
Shopify Partner
4724 578 1706

Nope. In Customizer, add a "Custom liquid" section in a "Footer" section group.

paste code above into "Code" setting of this new section.

Screenshot 2025-05-19 at 2.37.28 AM.png

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com