Touch hitting button under html element
Asked Answered
C

2

6

I have the following html and css set up in a phonegap app. I am having an issue where when the "Pay Now" button is covered by the navigation links across the bottom of that page and the user tries to touch one of the navigation links the "Pay Now" button is being pressed instead of the navigation link.

Has anyone come across this before, been able to fix it?

Colner answered 19/12, 2012 at 12:46 Comment(0)
T
2

I have an hacky way you may try once...

Put a transparent rectangle behind the navigation links you have, so that whenever user will touch these links the event will not land on your "Pay Now" button,

Best of luck ....

Thibodeau answered 21/1, 2013 at 16:50 Comment(1)
Would the containing div#menu not already be doing this? Not forgetting the containing ul and li that the link is in?Colner
E
2

Set the menu's z-index value to a higher value in the page, precisely in (div#menu ul) rule

Enclave answered 22/1, 2013 at 7:44 Comment(2)
The z-index is set to 10 on div#menu. Would that not raise the z-index of that div's contents?Colner
indeed it will raise the div content, but I as mentioned, try to apply that rule in (div#menu ul)Enclave

© 2022 - 2024 — McMap. All rights reserved.