Reputation: 4222
I have a simple div that if clicked to much turns blue: JsFiddle
In Chrome its worse, the whole div(30x30px + some other surounding elements) turns blue. Is there anything I can do about this (other than using img)?
Upvotes: 2
Views: 3188
Reputation: 5697
This CSS will do the trick:
div::selection {
display:none;
}
It sets the selection (highlight) to display:none
, so you don't see it.
Upvotes: 2
Reputation: 1299
Sorry for asking, but isn't this just you marking it by double-clicking it? The "blue" highlight effect would be the normal behaviour in all browsers...
If you do not want this behavior, you should make sure it is not selectable by applying styles:
-moz-user-select: none;
-webkit-user-select: none;
Updated:
For Internet Explorer, use the unselectable tag on your div:
<div class="right" unselectable="on">»</div>
Upvotes: 14