Make header transparent and solid on scroll

how can i make the background transparent but solid when i start scrolling?

www.andiacollective.com.au

Hello @Andia

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.gradient { background: transparent !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

there is an overlap now

Hello @Andia
Go to online store ---------> themes --------------> actions ------> edit code-------> base.css — add at the very end of the file.

@media screen and (min-width: 990px) {
    .header {
        padding-top: 30px;
    }
}

adn the result will be

let me know if this solved your purpose.
Thanks

this didnt seem to work! still overlaps

sticky-header.header-wrapper { background: transparent; position: fixed; top: 0; left: 0; right: 0 } .scrolled-past-header * { background: #F2F3EE !important; } this is the code i used so that the header is transparent and then goes solid when scrolled

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.header { padding-top: 40px !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

when i scroll i dont want this extra space. is there a way to get rid of it?

Please check the screenshot

It look fine