I have this div element with a background image and I want to stop highlighting on the div element when double-clicking it. Is there a CSS property for this?
The CSS below stops users from being able to select text. Live example: http://jsfiddle.net/hGTwu/20/
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
/* Rules below not implemented in browsers yet */
-o-user-select: none;
user-select: none;
To target IE9 downwards and Opera the html attribute unselectable
must be used instead:
<div unselectable="on">Test Text</div>