• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.