Now I'm by no means an advocate for 'faux-DRM text protection' but if I want a HTML element to have a click or double click event, I don't want the text in it to be selected as well, which is where this bit of CSS comes in handy:
.prevent_selection
{
-moz-user-select: none; /* mozilla browsers */
-khtml-user-select: none; /* webkit konqueror browsers */
-webkit-user-select:none; /* webkit chrome, safari browsers */
-ms-user-select: none; /* IE10+ browsers */
}
Obviously this doesn't work for IE9 and below, so it's probably a good idea to use a Javascript implementation if you anticipate supporting Internet Explorer users.