Dawn Theme: Sticky transparent header, but becomes solid when scrolling

Solved

Dawn Theme: Sticky transparent header, but becomes solid when scrolling

GREENS
Tourist
18 0 2

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:

Screen Shot 2021-12-14 at 9.09.45 AM (1).png

Screen Shot 2021-12-14 at 9.09.41 AM (1).png

  

.

Accepted Solution (1)

dmwwebartisan
Shopify Partner
12321 2551 3725

This is an accepted solution.

@GREENS 

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!

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app

View solution in original post

Replies 5 (5)

dmwwebartisan
Shopify Partner
12321 2551 3725

This is an accepted solution.

@GREENS 

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!

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
jg6
Tourist
3 0 1

@dmwwebartisan after I did the code for the transparent sticky background my logo dissappeared how do i code it back in?

dmwwebartisan
Shopify Partner
12321 2551 3725

@jg6 

Please share your store URL! and a screenshot of what do you want!

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
NachoBCN12
Excursionist
35 1 6

I've just tried this code, but nothing happen to the header. Please can you help me?

sammyb
Visitor
3 0 0

same here, have you found a solution?