Text Selection

Submitted by:Andery Smith

Date added:15 March, 2011

Category:CSS

Some people are unaware that it is possible to change the color when you highlight text in your browser. It is so easy to with two selectors; just be careful you don’t ruin your site with it.

Tags: highlight text , text selection

Code Snippet:

1	::selection {
2 color: #000000;
3 background-color: #FF0000;
4 }
5 ::-moz-selection {
6 color: #000000;
7 background: #FF0000;
8 }
 
 

Comments