[wd_asp elements=’search’ ratio=’100%’ id=1]

Making text unselectable using CSS – mobile phone

7th February 2020

CSS

Css - Codehaven

When viewing the internet on a mobile phone, the user will not be able to ‘cut and paste’ or select text. This can be annoying sometimes when you need to send share details of a web page, but at other times it may be needed, such as when you have a scrollable web page but when the user scrolls, it selects the text by accident, instead of scrolling. This code attached to the element will make the text unselectable and scroll once again.



This <div> has a callback for the drag action.