Styling text selection colours

I just discovered that you can style the user’s text selection using CSS 3. At the moment it only works in Gecko and Safari – Safari supports it through the official ::selection whilst Mozilla supports it through the proprietary ::-moz-selection rule. I used the following two rules to change the selection colours:

::-moz-selection { color: black; background: #A0B7CC; }
::selection { color: black; background: #A0B7CC; }

There was no real good reason for doing it apart from that it looks hip. Accidently discovered at moo.fx, more info at Quirks Mode.

3 thoughts on “Styling text selection colours

  1.  

    I cant seem to get any other font colours for my msn messenger. i’ve gone to all difffernt sites to look for other colours apart from the standard colours you get with the messenging service. please can u tell me where to get them from.

Leave a Reply

Your email address will not be published. Required fields are marked *