Disable or change Firefox's element/image highlight color

css, html, javascript

Solution

I don't think you can change the color of the highlight on the image but you can get rid of the highlight completely by doing this:

div {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

fiddle: http://jsfiddle.net/6Qqzq/33/

Problem

I want to get rid of the faded blue highlight color for certain elements (in particular, images). Here's a Fiddle for examplary purposes. Notice that when you highlight the text, it's appropriately yellow, as per the CSS. But when you drag-select to encompass the kittens, and/or you simply press CTRL+A to highlight the entire body, you get the faded blue selection color around the images. Chrome lets you disable this entirely and/or change it. Is there really no Mozilla equivalent? Because evidently `::-moz-selection` is not the answer: ``` div ::-moz-selection { background-color: yellow; } ``` This only works for the text. What about a method using JavaScript? Does such a thing exist?

Original source

Related problems