I have a site with back/next buttons fixed on the right and left side of the page. They are a single colour icon. Problem is they overlay both black and white images as the page scrolls. Can an 'anchor' or something similar be set so when the page reaches it (similar to how 'sticky' objects work I guess) I can change color of the div?
html (Wordpress)
...
<div><?php bnNav_content_nav( 'nav-below' ); ?></div> //puts the back/next buttons on the page
css
[class*="navigation"] .nav-previous a,
[class*="navigation"] .nav-next a {
position: fixed;
z-index: 999;
color: #fff;
}
I understand my code is complicated to understand but essentially the output is
post images ...
'anchor' to change the .nav color
post content...
<nav>
<nav id="nav-next"> ... </div>
<nav id="nav-previous"> ... </div>
</nav>
EDIT: The nav overlays images then the content is on a white background. I want the nav to be white when its over the images then when it hits the content turn black. So basically set up a spot where it will change