How Change Text Selection Color In Blogs

How Change Text Selection Color In Blogs. In this article I will tell you a simple trick to change the color of selected text. You have seen many blogs where you select some text and it is selected in blue or green or any other color. The default color of text selection is black but you can change it.

Here is an easy step to give your blog selection color according to your need.


/* 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;
}

Just copy above given code and paste it into thee main css file of your blog.

If you are using blogger, go to template and edit template and then there is an option of custom CSS. Just paste this code in custom css box.

If you are using wordpress then paste this code into main.css file or many themes also give option to paste custom css code in theme options.

 

Leave a Reply

Your email address will not be published. Required fields are marked *