How to Change the Default Text Highlight Color of Your Blogger Blog

 

 

Fed up with your blog’s default text highlight color? Now you can change it with cute colors of your choice by adding this cool CSS3 declaration — ::selection — to the stylesheet of your blog.   Here’s how to do it:

Code:

1

2

3

4

5

6

::selection {

   background: #ffb7b7; /* Safari */

   }

::-moz-selection {

   background: #ffb7b7; /* Firefox */

}

If you want to change the color of the selected (highlighted) text, just add color:, as in the following example:

 Code:

1

2

3

4

5

6

7

8

::selection {

   background: #ffb7b7; /* Safari */

        color: #ffffff;

   }

::-moz-selection {

   background: #ffb7b7; /* Firefox */

        color: #ffffff;

   }

It´s a little something that most visitors will probably never see, but it is a fantastic visual touch for those who do. This nice trick works on all major browsers except IE.  As always, IE is left behind. (Which is not a real problem because IE simply ignores the change and shows the default highlight color.)

css-text-selection

If you need help in adding the code to your Blogger blog, please leave a comment below.

Good luck!

Special thanks to css-tricks.

1 Comentário:

Austin Kendrick said...
This comment has been removed by the author.

Post a Comment