Shopify themes, liquid, logos, and UX
Hi,
I am using Dawn theme, with a solid header. I want to do the following:
1) At the top of the page, I want the header to be transparent.
2) When scrolling, I want the header to become sticky + solid, instead of transparent.
My url - https://greenly-living.myshopify.com/
Password - perry
Sticky header that becomes transparent/solid I'm referencing:
.
Solved! Go to the solution
This is an accepted solution.
Please add the following CSS code to your assets/base.css bottom of the file.
@media screen and (min-width: 990px){
.site-header-transparent:not(.header--middle-left) .header__inline-menu {
margin-top: 1.05rem;
}
.header:not(.header--middle-left) .header__inline-menu {
margin-top: -3.95rem;
}
.header.header--top-center .header__heading, .header.header--top-center .header__heading-link {
justify-self: center;
text-align: center;
display: none;
}
.site-header-transparent.header--top-center .header__heading, .site-header-transparent.header--top-center .header__heading-link {
justify-self: center;
text-align: center;
display: block;
}
}
Hope this works.
if any problem let me know!
Thanks!
This is an accepted solution.
Please add the following CSS code to your assets/base.css bottom of the file.
@media screen and (min-width: 990px){
.site-header-transparent:not(.header--middle-left) .header__inline-menu {
margin-top: 1.05rem;
}
.header:not(.header--middle-left) .header__inline-menu {
margin-top: -3.95rem;
}
.header.header--top-center .header__heading, .header.header--top-center .header__heading-link {
justify-self: center;
text-align: center;
display: none;
}
.site-header-transparent.header--top-center .header__heading, .site-header-transparent.header--top-center .header__heading-link {
justify-self: center;
text-align: center;
display: block;
}
}
Hope this works.
if any problem let me know!
Thanks!
@dmwwebartisan after I did the code for the transparent sticky background my logo dissappeared how do i code it back in?
Please share your store URL! and a screenshot of what do you want!
Thanks!
I've just tried this code, but nothing happen to the header. Please can you help me?
same here, have you found a solution?
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024