Havaing an odd problem that I've concluded does not have to do with z index - I first had this as an a href and now have a button but with both had the same problem of mouse hover and mouse click NOT being detected. At all.
I echo html here:
<?php
//---------------------------------------------------------------------
echo '<div class="wrapper">';
echo '<h1 class = "abtHeader"></h1>';
echo '<div id = "paragraph"> <br></div>';
echo '<div id = "paragraph2"> </div>';
echo '<button type="submit" class="register-button" name="Register">Register</button>';
//echo '<a class "register" href = "../"><div>Register</div></a>';
echo '<ul class="bg-bubbles">';
echo '<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>';
echo '</ul>';
echo '</div>';
?>
Then my CSS where I try to detect hover (no change in background color made):
.register-button {
z-index: 5;
padding-top: 100px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
background-color: white;
border: 0;
padding: 10px 15px;
color: #53e3a6;
height: 50px;
border-radius: 5px;
width: 250px;
cursor: pointer;
font-size: 18px;
-webkit-transition-duration: 0.25s;
transition-duration: 0.25s;
}
.register-button:hover {
background-color: #f5f7f9;
}
Then my javascript func which is not executedL
//Register
$(".register-button").on('click', function(e){
console.log("go to register");
header('Location: ../register');
});
I've tried moving the z index up however this makes no difference. Why isn't mouse hover/click detected on my button?