Reputation: 7080
I'm using button with position:fixed
. If I hover mouse, it changes as a hand symbol when after scrolled it does not hover.
Before scrolling hover works at center of the button not at edges.
<form action="response.php">
<button style=" position:fixed;" >Get Your Result </button>
</form>
default position i bring mouse into center of button it works
same default position hover is not working even mouse cursor on button
finally i scrolled after hover entirely gets disabled
Upvotes: 2
Views: 1374
Reputation: 1776
Try adding z-index
property to your button.
This might be happening because on scroll, your button might be having any other element overlapping it.
FYI: In z-index
, elements with higher z-index value comes in front.
Upvotes: 3
Reputation: 515
Are you looking something like this:
<body>
<form action="response.php">
<button type="button" style=" position:fixed;" >Get Your Result </button>
</form>
</body>
styles
button:hover{
background-color: red;
cursor: pointer;
}
body{
height: 2000px;
}
Upvotes: 1
Reputation: 4637
Use this
<form action="response.php">
<button type="submit" style=" position:fixed;cursor:pointer;" >Get Your Result </button>
</form>
Upvotes: 1
Reputation: 19341
I think here works what you want:
<form action="response.php" style="min-height:800px;">
<button style=" position:fixed; cursor:pointer;" >Get Your Result </button>
</form>
Check Fiddle
Upvotes: 1
Reputation: 3162
I think need to set button type Like this
<button type="submit" style=" position:fixed;" >Get Your Result </button>
Upvotes: 1