Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Microsoft Edge's phone number styling

I noticed that the new Microsoft Edge browser overrides my styles when it detects phone numbers:

<span class="phone">(123)123-1234</span> 

See this jsfiddle (must be opened using Microsoft Edge :P).

This sort of intrudes upon the design of the website, and is rather obnoxious. Sure seems like a trait of a successor to IE :/

How can I override or disable this so my website users will not see it?

like image 572
karns Avatar asked Aug 13 '15 02:08

karns


2 Answers

You can get rid of it by adding this meta tag in the header of your pages.

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

Microsoft's documentation on this tag.

Hopefully there will be a better way to turn this off globally without bloating pages... Or better yet disable this feature by default.

like image 179
scunliffe Avatar answered Sep 25 '22 12:09

scunliffe


If you don't want to disable for an entire page as the selected answer suggests, you can add the following attribute to a specific tag

<p x-ms-format-detection="none"> 

Reference: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/dev-guides/dn265018(v=vs.85)#controlling-phone-number-detection

like image 43
maguy Avatar answered Sep 21 '22 12:09

maguy