Skip to content

Instantly share code, notes, and snippets.

@triple-j
Last active August 29, 2015 14:18
Show Gist options
  • Save triple-j/63ea3640a8ec0b4d7cec to your computer and use it in GitHub Desktop.
Save triple-j/63ea3640a8ec0b4d7cec to your computer and use it in GitHub Desktop.
Mobile IE and iOS blue phone and address links fix
/* override phone auto link colors (IE Mobile & iOS) */
a[href^="maps:"],
a[href^="tel:"] {
color: inherit;
text-decoration: none;
}
@triple-j
Copy link
Author

The browsers in Windows Phones and iPhones will turn phone numbers and street addresses they find into links. That way the user can just click an address to open up their map/gps program, or they can click a phone number to call that number.

This functionality is helpful, however the default if to make these links blue(#0000FF) and underlined. Depending on your website's style this can cause problems, especially on dark backgrounds.

This CSS will prevent phone numbers' and addresses' from being styled differently from the surrounding text. These links will no longer stand out, but their functionality will still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment