codehaven - php snippets - coding help
Generic filters
Exact matches only
  • Making text unselectable using CSS – mobile phone

    7th February 2020


    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.

    Was this code snippet helpful?