disable user selecting text

  • November 20, 2012
  • CSS

How to disable user selecting text using CSS.

Just about every vendor prefix used here as the browsers continue to implement features from the CSS3 spec.

-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

Sadly, Opera doesn’t seem to support user-select.

I use this on input labels to make a smoother interface and avoid the accidental selecting of text.

Take a look here for more information: http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select

No Comments

You can leave the first : )

Leave a Reply

Your email address will not be published. Required fields are marked *