Posted By

neal_grosskopf on 12/07/07


Tagged

css selection CSS3


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

copyleft
SpinZ
sbbath
stoker
neal_grosskopf
Mithun
batamire


Change Color of Selected Text


 / Published in: CSS
 

URL: http://www.quirksmode.org/css/selection.html

Change the color and background color of selected text using only css. Compatible with Firefox and Safari, but not Internet Explorer

  1. ::-moz-selection
  2. {
  3. background:#6374AB;
  4. color:#fff;
  5. }
  6.  
  7. ::selection
  8. {
  9. background:#6374AB;
  10. color:#fff;
  11. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Mithun on July 22, 2008

Thank you

You need to login to post a comment.