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

1 Flares Twitter 0 Facebook 0 Google+ 1 LinkedIn 0 Pin It Share 0 StumbleUpon 0 Buffer 0 Buffer 1 Flares ×

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

1 Flares Twitter 0 Facebook 0 Google+ 1 LinkedIn 0 Pin It Share 0 StumbleUpon 0 Buffer 0 Buffer 1 Flares ×
Brad Dalton

Brad Dalton

WordPress Consultant 110+ Hrs/Week, traveler and lover of big surf, making new friends & my family. Read more about Brad Dalton or contact me if you need help with WordPress.
Brad Dalton

@wpsitesdotnet

Howdy! WP Sites creates daily tips & tutorials providing solutions for WordPress users.
Beginners Guide To Adding Custom Fields In WordPress http://t.co/CUjr4Smiry - 32 mins ago
Brad Dalton

Never Miss The Latest Design Tips!

Speak Your Mind

*

Need A Solution for WordPress?

solutions for wordpress
WP Sites offers new posts & 900+ existing tutorials which include:

  1. 1. The basics on using WordPress to build & design a website
  2. 2. Tested PHP & CSS code snippets for easy customization of your theme
  3. 3. Tips, tricks & idea's on how to solve problems with WordPress

 
Enter your email address below & click "Get Updates!"