Friday, January 31, 2014

phone links color on iOS broser - iPad/iPhone



Among a variety of CSS attribute selectors some behave specifically when viewing form mobile device. This occasionally happens for iOS devices - the phone number starts looking like a link.



To fix this you can use the following CSS-markup:

a[href^=tel]{
    color:inherit;
    text-decoration:none;
}
And to still keep it an active line (we're on mobile, so that's handy) you should add the href-attribute, like this:

<a href="tel:5551231234">555 123-1234</a>

Related discussion on: http://stackoverflow.com/