Is there a way to change the color of the "text selection"? I am using red over black background when I select a text it turns grey. As the area around the selected text is black it is not seen. Can I change the color of that area?
Printable View
Is there a way to change the color of the "text selection"? I am using red over black background when I select a text it turns grey. As the area around the selected text is black it is not seen. Can I change the color of that area?
Some browsers support a CSS construct for this. CSS 3 will include the selection pseudo-element, which you can use to style selected stuff. However, I think currently only Mozilla supports it, under the proprietary name of -moz-selection.
There is no cross-browser way to do this.Code:::-moz-selection {
background-color: green;
}