Changing the text selection color is always a nice touch, it shows that you’re paying attention to the finer details of the site.
Today in this snippet we share a quick tip that will allow you to achieve some different looks for your selected text.
[css]
/* Mozilla based browsers */
::-moz-selection {
background-color: #FF68B0;
color: #FFF;
}
/* Works in Safari */
::selection {
background-color: #FF68B0;
color: #FFF;
}
/* Works in Opera */
::-o-selection {
background-color: #FF68B0;
color: #FFF;
}
::-ms-selection {
background-color: #FF68B0;
color: #FFF;
}
/* Works in Internet Explorer */
::-webkit-selection {
background-color: #FF68B0;
color: #FFF;
}
[/css]
Continue reading
You might also like
Code Snippets
May 25, 2015
·
1 min
Create Short Code for Custom Post Type with WordPress Custom Plugin
In this post, you’ll came to know that how to create short code for custom…
Code Snippets
Mar 27, 2015
·
1 min
How to Show or Hide Widgets on Specific Pages without Plugin
Do you want to show or hide widgets on specific pages in WordPress? You can…
Code Snippets
Dec 30, 2013
·
1 min
Scroll to Top with jQuery
If your pages are long winded, it’s a good idea to provide viewers with an…
Code Snippets
Dec 30, 2013
·
1 min
How to Make Bootstrap Dropdown Menu Extend on Hover
Bootstrap is a great CSS and Javascript framework. One of its brilliant features is the…

Hi!
Thanks for sharing your discoveries.
I can complete it a bit.
There is only the “-moz-” vendor, others do not exist: http://caniuse.com/#feat=css-selection
The folowing lines are good enough:
/* Mozilla based browsers */
::-moz-selection {
background-color: #FF68B0;
color: #FFF;
}
/* Works in IE, chrome, safari & opera */
::selection {
background-color: #FF68B0;
color: #FFF;
}
Cheers,
Thomas.