Welcome to You!

Be with the calm of nature in our wonderful lake rental

Simple Elementor Transparent Header Changing Background Color On Scroll

No extra plug-ins required! Elementor Pro required.

To begin with, create your hero section

Simple Elementor Transparent Header Changing Background Color

Then, above it, create a new section

This is where the Elementor sticky transparent header will be. Give that section this width setting.

Simple Elementor Transparent Header Changing Background Color

Create your header within that Elementor Section

Give that section  the class ‘stickyheadersection’ . Adjust the padding to what you need. 

Simple Elementor Transparent Header Changing Background Color

Now, set the Elementor header section to sticky.

Set it sticky. (This is an Elementor Pro feature)

Elementor Sticky Header Changes Logo Size and Position

And give it negative margins to bring it above the hero section. Also give it a z-index value of 999.

Simple Elementor Transparent Header Changing Background Color

Then, set 'Effects Offset' to '30', or your preferred value

This will determine when it will go from transparent to the color you will set in the code.

Simple Elementor Transparent Header Changing Background Color

Finally, add this CSS to the place of your choice

Adjust the background color to your desired value. When scrolling down, the Elementor transparent sticky header will change to that color.



.stickyheadersection {
transition: background-color .4s ease;
}

.elementor-sticky--effects.stickyheadersection {
background-color: #fff; /* Background color when sticky */
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.29); /* remove if you don't want a box shadow on the sticky header */
}

.elementor-sticky--effects.stickyheadersection a {
color: #000!important; /* Change this to the color of the links when sticky is active */
}


Et voila! Thanks for reading!