Jump to content

Mobile Menu (Page Color Opacity) + Shopping Cart Icon (Number Position)

Recommended Posts


Hello!

I have been trying to resolve 2 issues, and for the life of me I can't seem to fix them myself! Any help would be greatly appreciated. 😃

 

Issue #1:

This is a small yet annoying thing: the number (quantity) of items in the cart isn't centred inside its background circle, and it is driving me insane. Is there a way to make it fit in the middle? (You won't see a number beside the cart unless you add an item through the SHOP page, because I have CSS hiding the quantity when at zero). See picture #1

Issue #2

I am trying to change the color of the page when my side mobile menu is open. I have CSS to control the opacity, but not the color! (it is currently white). I would like it to be black, same opacity. See picture #2

Thank you!!!
password for website: g

 

 

 

 

 

 

 

cartnumber.jpg

overlay.jpg

Link to comment

Update : I have added a desktop overlay menu, and I hope to have the same black opacity on the page too! At the same time, I would like to extend the closing clickable area on the desktop menu (if you try, you will see it is only on the far right end side that it works, it would be great to have the whole page outside the menu). Thank you ❤️

Link to comment

Did you solve #1, #2 or still need help?

With closing clickable, far right end side works, because it is a part of burger menu

image.thumb.png.6b5e3b7fa6a780c440414f5272b474d5.png

add this code to CSS box to increase width of clickable area

.header-burger.menu-overlay-has-visible-non-navigation-items {
    left: 30% !important;
    right: 0 !important;
    width: 70% !important;
}
button.header-burger-btn.burger.burger--active {
    width: 100% !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Change to this

@media screen and (min-width:992px) {
.header-burger.menu-overlay-has-visible-non-navigation-items {
    left: 30% !important;
    right: 0 !important;
    width: 70% !important;
}
button.header-burger-btn.burger.burger--active {
    width: 100% !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thank you!!! Just what I needed!

Can you please help me with problem #1 and problem #2 as well? I haven't figured out how to fix them.

(The opacity color of the page when overlay menu is open, and the position of the cart quantity number inside its circle background).

Thank you 🙏

Link to comment

#1. Use this CSS code

.icon-cart-quantity {
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
}

#2. You mean page content background color/opacity?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment


Thank you Tuanphan! 

The code didn't do exactly as I hoped, but I figured out another way to get the effect I was looking for.

But I have another problem now.

Can you help me change the coloured section that's right above the header on mobile from black to WHITE on ALL PAGES?
 

SEE PICTURE, SECTION ABOVE RED LINE:

code.jpg

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.