I’ve tried a lot of different codes but I can’t make it work.
The primary navigation is transparent. What can I do to change the color when scrolling down?
(for example black or white)
The code I now have in the Additional CSS section is:
to begin you can use the Sticky Navigation function in the Customiser, to fix the navigation when scrolled, so that CSS isn’t required. Then you can target it like so:
Thanks it worked for the most part. When I scroll down the navigation bar turns white, but when it’s on the top of the page it is a light grey/ white color. Not transparent.
Also, is it possible for the navigation to change text color when scrolling down? (from white to black)
OK so a bit more CSS, the first two rules are to move the page content under the navigation. Note that this may effect the way your Page Builder operates so this may need to be commented out when your editing the page. The third code will allow you to style the sticky nav text color.
#site-navigation {
position: relative;
}
#page {
margin-top: -45px;
}
#sticky-navigation .main-nav ul li a {
color: #000;
}