How to change the colour of text when its selected by css/javascript? A cross browser compatible solution would be preferred.
Thanks in advance.
How to change the colour of text when its selected by css/javascript? A cross browser compatible solution would be preferred.
Thanks in advance.
just use ::selection
in your stylesheet. you can view an example on quirksmode.org. as you can read here, this is supported by all modern browsers except internet explorer <9.