Disable text selection
This snippet disables text selection on all browsers.
body{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Written by Mahmoud El Ghandour
Related protips
4 Responses

In combination with 'cursor: default;' this is really awesome!
over 1 year ago
·

Awesome.
No longer need javascript for this :)
over 1 year ago
·

@razvanstan ;)
over 1 year ago
·

Is there a use for this that doesn't make your users instantly hate you?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css3
Authors
Related Tags
#css3
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#