Remove Semi-Transparent Background By Clicking Menu

Solved

Remove Semi-Transparent Background By Clicking Menu

ronii
Excursionist
13 0 5

Hello! I've implemented a transparent header on my website, but every time I click on the menu button, a semi-transparent white background appears, covering my site and giving it an unappealing look, as shown in the image. How can I adjust this so that the background becomes transparent and blurred at 35%? Thank you!

Just-Want.com

i use Crave 12.0.0

 

Capture.PNG

 

Accepted Solution (1)
ThePrimeWeb
Shopify Partner
2139 616 520

This is an accepted solution.

Hey @ronii,

 

Just replace the code with this

<style>
cart-drawer.drawer.is-empty.animate.active {
    background: transparent !important;
    transition: none !important;
    
}

body:has(cart-drawer.drawer.is-empty.animate.active):before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
    backdrop-filter: blur(10px) !important;
    background: rgba(255,255,255,0.1) !important;
    z-index: 1 !important;
}

cart-drawer.drawer.is-empty.animate {
    background: transparent !important;
}
</style>
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!

View solution in original post

Replies 9 (9)

Made4uo-Ribe
Shopify Partner
9873 2352 2949

Hi @ronii 

Is this what you mean?

Made4uoRibe_0-1711474328811.png

 

If it is, check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

.cart-drawer__overlay {
    background: white;
    opacity: .9;
}

 

And Save.

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

ThePrimeWeb
Shopify Partner
2139 616 520

Hey @ronii,

 

Go to your theme's "Edit Code" Option, then in the search bar type "theme.liquid"
Below the tag "<head>" tag paste the following. Screenshot attached for reference.

 

<style>
cart-drawer.drawer.is-empty.animate.active {
    background: transparent !important;
    transition: none !important;
    
}

body:has(cart-drawer.drawer.is-empty.animate.active):before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
    backdrop-filter: blur(10px) !important;
    background: rgba(255,255,255,0.1) !important;
}

cart-drawer.drawer.is-empty.animate {
    background: transparent !important;
}
</style>

 

Screenshot is for reference only, the correct code to paste is the one shown above.

ThePrimeWeb_0-1711474858476.jpeg

 

Result:

ThePrimeWeb_1-1711474875830.png

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
ronii
Excursionist
13 0 5

Hello, thank you for your response, it works as I wanted but there is a problem. When I am on my product page, this appears:Capture2.PNG

I really want everything to be blurry except the logo in the header bar.

ThePrimeWeb
Shopify Partner
2139 616 520

This is an accepted solution.

Hey @ronii,

 

Just replace the code with this

<style>
cart-drawer.drawer.is-empty.animate.active {
    background: transparent !important;
    transition: none !important;
    
}

body:has(cart-drawer.drawer.is-empty.animate.active):before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
    backdrop-filter: blur(10px) !important;
    background: rgba(255,255,255,0.1) !important;
    z-index: 1 !important;
}

cart-drawer.drawer.is-empty.animate {
    background: transparent !important;
}
</style>
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
ronii
Excursionist
13 0 5

It's perfect, thank you so much for fixing my issue. Do you see the update on my site? Because when I publish the modification, it's not being reflected (but it remains active on my Shopify editor).

ThePrimeWeb
Shopify Partner
2139 616 520

Yeah i see it, your site is probably cached.

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
ronii
Excursionist
13 0 5

I just noticed that the basket doesn't blur when it has a product in it, do you have a solution?

ThePrimeWeb
Shopify Partner
2139 616 520

Replace the code with this

 

<style>
cart-drawer.drawer.animate.active {
    background: transparent !important;
    transition: none !important;
    
}

body:has(cart-drawer.drawer.animate.active):before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
    backdrop-filter: blur(4px) !important;
    background: rgba(255,255,255,0.1) !important;
    z-index: 2 !important;
}

cart-drawer.drawer.animate {
    background: transparent !important;
}
</style>

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
ronii
Excursionist
13 0 5

Thank you, it's okay, the issue has been resolved. Thank you very much for what you've done.