Link to home
Start Free TrialLog in
Avatar of seanpowell
seanpowellFlag for Canada

asked on

modify tel attribute with css media query

Hi - we have the following in a responsive email:
<a href="tel:1-xxx-xxx-xxxx">1-xxx-xxx-xxxx</a>
Works great, but folks getting the email through their desktop outlook client get an "Access Denied" popup. Is there a way to have the tel protocol only display using media queries?
Thanks!
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

For an email, I think you are best to keep as normal text.  Phones typically can distinguish the  format of your number and create the link automatically.
Use a conditioned script to assign different attributes on different media.
Try:

jQuery(".CLASSNAME").attr("href","CONCRETE_ATTRIBUTE_BASED_ON_MEDIA_T5YPE");
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of seanpowell

ASKER

Thanks padas - much appreciated!
@ HagayMandel - sorry, can't use scripting in an email and as such required a css solution. Thanks for taking the time!