How to Change the Color of Selected Text – CSS Tutorial

In this article we will find How to Change the Color of Selected Text.This is very simple and basic tips for the web designers and developers. Whenever a person select a text , its color changes to defined color. For example, on my blog theme ,if you select some text you will notice sky blue color in place of default color. Simply add these few lines in your css documents.


[ad#co-1]
selected-color-heading

[code lang="css"]
::-moz-selection{
background:#C1EEFB ;color:#000
}
::selection{
background:#C1EEFB; color:#000
}
[/code]

This property is not supported by IE. View Demo

let us know your thoughts? If you found any other tutorials that you want to share with us,feel free to let us know by dropping in a comment.

8 thoughts on “How to Change the Color of Selected Text – CSS Tutorial

  1. Pingback: tripwire magazine | tripwire magazine

  2. Pingback: 95+ Fresh Community Posts for Web Designers and Developers | tripwire magazine

  3. Pingback: 95+ Fresh Community Posts for Web Designers and Developers | Afif Fattouh - Web Specialist

  4. Pingback: Linkhub – Woche 04-2010 « pehbehbeh

Leave a Reply

Your email address will not be published.