Custom Highlight Colour on Select

Simple
Custom Highlight Colour on Select

To add this effect globally across your site, add this code to your page head in your project settings:

<style>
::-moz-selection { /* Firefox */
color: #333333;
background: #FFD900;
}

::selection {
color: #333333;
background: #FFD900;
}
</style>

Change the 'color' to the text colour you want, and change 'background' to the background colour you want.

To add it only to a certain div or piece of text, you just need to specify the class that the effect should be added to:

<style>
.content-class ::-moz-selection { /* Firefox */
color: #333333;
background: #FFD900;
}

.content-class ::selection {
color: #333333;
background: #FFD900;
}
</style>
Download Assets
See an Example Website

Other Code Snippets

Learn How to Turn More Website Traffic into Customers in Just 5 Days

Trusted by hundreds of businesses around the world.

Nice! You're in the loop. Talk soon.
Oops! Something went wrong while submitting the form.