Arthur Kushman
Arthur Kushman

Reputation: 3629

How to set blue phone links/anchors to another color on iPad/Safari?

I've created a site and the phone number on the top of the screen is normally brown through CSS, but when I'm opening it in iPad it becomes blue, I know that there are functonality to call around it, but how can I change it's behavior (just change the color)?

Upvotes: 2

Views: 4329

Answers (2)

Darren S
Darren S

Reputation: 940

I prefer not to disable the functionality but override the color;

a[href^=tel] {
text-decoration:inherit;
color: inherit;
}

Upvotes: 7

Raphael Petegrosso
Raphael Petegrosso

Reputation: 3870

Add this meta to your HEAD tag:

<meta name="format-detection" content="telephone=no">

But, if you are using Objective-C (loading the HTML on a UIWebView) and want to prevent the phone detection on all pages you can set:

_webView.dataDetectorTypes = UIDataDetectorTypeNone;

Upvotes: 6

Related Questions