I can not click on the link in the header. Even if with absolute positioning I put the z-index 9999 anyway, stupidly I can not click, as if I click on the picture. I do not even know what could be the problem.
$(window).scroll(function() { var st = $(this).scrollTop(); $('.header-img').css({ 'transform' : 'translate(0%, ' + st / 100 + '%' }); $('.get-start').css({ 'transform' : 'translate(0%, -' + st + '%' }); }); .get-start{ width: 19%; padding: 15px 0 15px 0; display: inline-block; margin-left: 40%; background-color: var(--ThemeColor); text-decoration: none; color: var(--BgColor); font-size: 20px; border-radius: 5px; text-align: center; position: absolute; top: 70%; } .header-img-container{ top:-100px; z-index: -1; position: fixed; width: 100%; background-size: cover; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="header-img-container"> <img class="header-img" src="<?php echo get_header_image(); ?>"> <a class="get-start" href="#">GET START WITH US</a> </div>