CSS: Changing Highlight Color

If you highlight text on the internet, most of the time the result will be the same: a blue background. If you wish to change this from happening on your website, all it takes is some css code. This will not work in all browsers, but most of your users will get the full experience. Simply include ::selection{  } and ::-moz-selection{  } in your css and detail within the brackets the changes you want the text to go through when it is highlighted by the user. An example can be seen in the picture below:

background highlight color

Casey Bradford

~ by caseybradfo on October 3, 2011.

%d bloggers like this: