We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Customize Header and Logo Color to Change When Scroll and Hover

Solved

Customize Header and Logo Color to Change When Scroll and Hover

dngmanblack
Excursionist
31 1 2

Hi!

I want to add a new design to my header. When I am at the top of the page, my header is transparent with a white logo. But when I hover over or scroll down, I want all of the elements on header section to turn black. I'm using Dawn theme. Thanks for your help!
This is my store: www.siulux.com
PW: @Siulux19

Accepted Solution (1)

topnewyork
Astronaut
1552 192 253

This is an accepted solution.

Hello, @dngmanblack  for CSS

1) Go to Online Store
2) Edit Code
3) Find theme.css/base.css file
4) Add the following code in the bottom

header {
  background-color: transparent !important;
  transition: background-color 0.3s ease !important;
}

header a {
  color: white !important;
  transition: color 0.3s ease !important;
}

header:hover {
  background-color: black !important;
}

header:hover a {
  color: white !important;
}

header.scrolled {
  background-color: black !important;
}

header.scrolled a {
  color: white !important;
}

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

View solution in original post

Replies 3 (3)

mrashid
Shopify Partner
302 26 33

@dngmanblack Yes, it is absolutely possible to achieve this effect with a combination of CSS and updates to the Liquid code. 

 

- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

topnewyork
Astronaut
1552 192 253

This is an accepted solution.

Hello, @dngmanblack  for CSS

1) Go to Online Store
2) Edit Code
3) Find theme.css/base.css file
4) Add the following code in the bottom

header {
  background-color: transparent !important;
  transition: background-color 0.3s ease !important;
}

header a {
  color: white !important;
  transition: color 0.3s ease !important;
}

header:hover {
  background-color: black !important;
}

header:hover a {
  color: white !important;
}

header.scrolled {
  background-color: black !important;
}

header.scrolled a {
  color: white !important;
}

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
dngmanblack
Excursionist
31 1 2

it's working, many thanks! Can you help me how to move the menu on above the logo image?