HackingUniversity - Hacks . Tricks . How-To's

31 January 2012

Change Text Selection Color in Blogger using CSS

If you do not know what is text selection well when ever you select something by dragging your mouse on a website to copy that stuff than you might have seen that blue default background which starts rolling with your mouse what ever you are selecting. So if you want change that color from default to anyone using HEX color codes than you can do that using a small CSS trick in blogger.


Default Color


Color Changed using CSS

So this is what you can do with this CSS tweak so just copy the below CSS code and paste it right above the ]]></b:skin>in your blogger edit HTML, to find this tag you can open the search box by pressing Ctrl + F key on your keyboard.

::selection {
background: #a8d1ff; /* Changes color in Safari */
::-moz-selection {
background: #a8d1ff; /*Changes color in Firefox */

So now just change the above color codes highlighted in grey color and use any other color codes you can search for codes using Google. So here you go with another awesome tutorial for your blogger blog which I think so many people would love to implement on their blog.