Microsoft Edge ignores text-decoration:none; for my telephone number


Microsoft Edge ignores text-decoration:none; for my telephone number



I just have my number on my website with an image above it acting as a link so mobile users just click it and call me. I was checking my site through a few browsers and Microsoft Edge underlines the phone number and changes the color to blue to show that it is a hyperlink. It continues to do so even after declaring the text-decoration to none.



For the sake of not broadcasting my phone number on a site that gets a lot of traffic, I do not want to provide the link to my website. I can however show the piece of code with a fake number:





Phone

Phone

555.555.5555




I appreciate any and all feedback as I am relatively new and self taught, so please excuse any code that may seem to be set up oddly.




2 Answers
2



Ran into the same problem. It's not supported in Edge according to caniuse.com.



https://caniuse.com/#search=text-decoration





Actually, it is supported, read the foot notes. In fact, I also just tested it myself on Edge 17.
– Brandito
2 days ago



You can enable/disable phone number detection in IE all together using the following meta tag



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


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



or you can disable it for individual elements by using the following attribute



x-ms-format-detection="none"


x-ms-format-detection="none"



As for removing the style like you asked in your question, you sorta can't override it with text-decoration. Although what you can do is style the link after removing the faux underline placed there by the browser.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Possible Unhandled Promise Rejection (id: 0): ReferenceError: user is not defined ReferenceError: user is not defined

Opening a url is failing in Swift