How To Change The Selection Color When Highlighting Text On Your Site

By default, the color used when you highlight text on a website is blue.

Not only can you change the color, you can also change the type of font and font color when text is selected and highlighted on your site.

Text Highlight Color

Simply add this code to your child theme’s style.css file and change the hex code colors to your own liking.

/* Change Selection Text Color When Highlighting */ 
::-moz-selection { background-color: #476f30; 
color: #fff; } 
::selection { background-color: #476f30; 
color: #fff; }
Change Text Selection Highlight Color

Pretty simple way to change the text color that’s highlighted when you select it for copy or search.

CSS Resources & Snippets

You’ll find this site an excellent source of CSS snippets.

The owner 0f CSS Tricks, Chris Coyier is regarded as a CSS expert.

Learn CSS

Another excellent resource for learning the basics and testing CSS code is http://www.w3schools.com/css/

If you know of other sites which offer code snippets you are welcome to add a link in the comments section. Thanks

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.