Posted By

bwangila on 01/24/11


Tagged

text-highlight


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

julianrhyswilliams
maltem
Some0ne
tux-world


Change Color of Highlighted Text on your Website Using CSS


 / Published in: CSS
 

Found this one interesting! We have gotten used to the usual blue background when you highlight text on most websites. However, now you have the power as a web designer to change that background and text color to one of your choice. Simply using CSS!

  1. ::-moz-selection {
  2. background: #FF5E99;
  3. color:#fff;
  4. text-shadow: none; }
  5.  
  6. ::selection {
  7. background:#FF5E99;
  8. color:#fff;
  9. text-shadow: none; }

Report this snippet  

You need to login to post a comment.