While visiting a website recently, I noticed that when its text was selected it had a background color that matched the background color of his website, which is usually a dark blue. Now, wouldn’t it look a little out of place if your website didn’t use any blue for the text background?
When looking for solutions on how to accomplish this, I was pleasantly surprised at how easy it was. Just add the following CSS to your page:
::selection{background: #A8141B; color: white; /* Safari */}
::-moz-selection{background: #A8141B; color: white; /* Firefox * / }
As you can see, this only works in Firefox and Safari. This may not seem like much, but it’s a subtle effect that can add some visual appeal to your website!