tags:

views:

198

answers:

2

Hi,

I want to develop a web application using HTML, CSS and Javascript one thing that is really annoying is that any link or button etc when clicked inside the Android browser gets highlighted with a green border.

To demonstrate what I mean I have included a link to a page that contains a basic game written in CSS

http://marbles2.com/app/

Is there any way that you are aware of to disable the click green border?

Cheers

Paul

A: 

Try this in your style:

style="-webkit-tap-highlight-color:rgba(0, 0, 0, 0);"

Hope this helps.

omt66
+3  A: 

In your CSS stylesheet (the one in your web application), add this:

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);  
}
Legend
This certainly disables the color, but it should be noted that this seems to be an all or nothing type of thing. For example, doing -webkit-tap-highlight-color: rgba(255,255,255,1) - which should get you a solid white, gets you the default green again.
RussellUresti
@RussellUresti: You are right... The problem is that the green border is not because of CSS but because of the Android browser so yes, the only way of getting rid of it is to disable it. As far as I am aware of, there seems to be no way of changing the color of the border.
Legend