Change text selection color

4 posts Page 1 of 1
Contributors
User avatar
XTechVB
VIP - Site Partner
VIP - Site Partner
Posts: 727
Joined: Thu May 20, 2010 10:32 am

Change text selection color
XTechVB
I just found this simple cool trick to change the text's selection color (that OLD blue rectangle :)).
Just place this code in the main stylesheet file (usually style.css ) of you're website.
Code: Select all
::selection {
	background: #ffb7b7; /* Safari */
	}
::-moz-selection {
	background: #ffb7b7; /* Firefox */
}
You can find more about this HERE.
Last edited by XTechVB on Wed Nov 06, 2013 11:48 am, edited 1 time in total.
You can find me on Facebook or on Skype mihai_92b
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Change text selection color
Dummy1912
cool :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Change text selection color
comathi
I never knew this could be done through CSS. I just always assumed they were using JavaScript or something to change the color.

Thanks for the share, and +rep
User avatar
Master M1nd
Top Poster
Top Poster
Posts: 82
Joined: Thu Aug 15, 2013 7:51 pm

Re: Change text selection color
Master M1nd
Once I also see this at the same site, And It's Awesome!

Good Sharing cooll;
4 posts Page 1 of 1
Return to “Tutorials”