Mobile call links

Hi, I’m trying to work out how to stop my href tel: link being active on non mobile devices. Can you advise please.

I have tried adding this to the CSS
@media screen
and (max-width: 768px) {
a[href*=“tel:”] {
pointer-events: none;
}
}

Kind regards

Mark

Hi Mark,

That code you mentioned should work in case you have the link implemented like that:
<a href="tel:+123456789" > Call Me! </a>

Just make sure you have the code written in a correct syntax like that:

@media screen and (max-width: 768px) {
	a[href*="tel:"] {
		pointer-events: none;
	}
}

And make sure all the custom CSS codes you have are correct in syntax, you can use this tool to verify that:

http://www.css-validator.org/

If none of these helped, then please provide us with WordPress Dashboard login details in a “Secure Note” so we can investigate this issue.

Thanks.

Hi thank you for your help, I struggled to get it to work only on mobile devices but then I spotted my mistake (max-width instead of min-width:)

@media screen and (min-width: 768px) {
a[href*=“tel:”] {
pointer-events: none;
}
}

Glad to hear you got it sorted.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.