Re: Hamburger Menu Colour change on scroll

Solved

How can I change the hamburger menu color on scroll in a Modular theme?

jr-rl
Tourist
24 0 2

Hello Everyone

 

I am using Modular theme and  have a transparent header that displays white logo and icon and changes to black and makes the white header appear when you scroll down. The menu on mobile though still keeps black icon with white background when the header is transparent and scrolled.

 

I am wanting the hamburger menu for mobile to behave the same as the cart, login, search icon and logo.

They are all white with transparent header, and when scrolled change to black against a solid white header 

 

Can someone please help me fix the mobile hamburger menu to behave the same

 

Much appreciated!

 

 

Screenshot 2023-02-14 at 12.39.42 pm.png

Accepted Solutions (2)
infoatcodelab7
Shopify Partner
593 141 154

This is an accepted solution.

@jr-rl 

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

Step 2: Search file theme.css

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

 

.menuToggle .diamond-bar{
  background-color: transparent !important;;
}

 

Want to modify or develop new website, Hire us.
If helpful then please Like and Accept Solution .
Email: info@codelab7.com

View solution in original post

infoatcodelab7
Shopify Partner
593 141 154

This is an accepted solution.

@jr-rl 

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

Step 2: Search file theme.css

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

 

.icon-menu .icon-bar, .icon-menu .icon-bar::before, .icon-menu .icon-bar::after {
	background-color: #fff;
}
.header--has-scrolled .icon-menu .icon-bar, .header--has-scrolled .icon-menu .icon-bar::before, .header--has-scrolled .icon-menu .icon-bar::after {
	background-color: #000;
}

 

Want to modify or develop new website, Hire us.
If helpful then please Like and Accept Solution .
Email: info@codelab7.com

View solution in original post

Replies 7 (7)

GemPages
Shopify Partner
5625 1261 1241

Hello @jr-rl ,

 

It's the GemPages Support Team and we are glad to assist you today!

 

Could you please share your store URL ( with the password if your store password is enabled ) then I can see and suggest something for you?

 

Best regards,
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
jr-rl
Tourist
24 0 2

url removed

infoatcodelab7
Shopify Partner
593 141 154

This is an accepted solution.

@jr-rl 

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

Step 2: Search file theme.css

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

 

.menuToggle .diamond-bar{
  background-color: transparent !important;;
}

 

Want to modify or develop new website, Hire us.
If helpful then please Like and Accept Solution .
Email: info@codelab7.com
jr-rl
Tourist
24 0 2

Thank you! that worked.

Is there a way to make it white when not scrolled and change to black once scrolled? 

 

Thanks!!

infoatcodelab7
Shopify Partner
593 141 154

This is an accepted solution.

@jr-rl 

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

Step 2: Search file theme.css

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

 

.icon-menu .icon-bar, .icon-menu .icon-bar::before, .icon-menu .icon-bar::after {
	background-color: #fff;
}
.header--has-scrolled .icon-menu .icon-bar, .header--has-scrolled .icon-menu .icon-bar::before, .header--has-scrolled .icon-menu .icon-bar::after {
	background-color: #000;
}

 

Want to modify or develop new website, Hire us.
If helpful then please Like and Accept Solution .
Email: info@codelab7.com
jr-rl
Tourist
24 0 2

@infoatcodelab7 Hey late reply, but is there anything I can add to this code to keep the hamburger menu black when on background colour?

 

The logo, cart, search and login all stay black unless the background is an image (they only turn white when background = not background colour)

 

Can I make the hamburger menu behave the same?

jr-rl
Tourist
24 0 2

 

Thank you so much!