Follow us on Facebook

Change Default Text Selection/Highlight Color with CSS3


CSS is Cascading Style Sheets which is used to describe styling parameters of any web document. It was developed by "World Wide Web Consortium" in 1996. Now, CSS3 is released and major browsers all supporting the latest parameters described in CSS3. One of the awesome effect introduced in CSS3 is changing the default highlight color of your blog i.e. the color that appears when text is selected. Now you can change that default color with any color of your choice. Here is how you can do it.

Change Default Text Selection Color

For changing the default selection color, ::selection parameter is used in style sheet. Add below code anywhere in your style sheet.

::selection {
background: #ffb7b7; /* Safari */
color: #ffffff;
}
::-moz-selection {
background: #ffb7b7; /* Firefox */
color: #ffffff;
}

Background means the color of background when text is selected.
color means color of text when text is selected.

How to Use it in Blogger Blogs ?

  • Login in Your Blogger Account.
  • Goto Dashboard > Design > EDIT HTML
  • Find This Code
]]></b:skin>
  •  Replace it with
::selection {
background: #ffb7b7; /* Safari */
color: #ffffff;}

::-moz-selection {
background: #ffb7b7; /* Firefox */
color: #ffffff;}

]]></b:skin>
  • Click on Save Template
  • Thats it !

No comments:

Post a Comment

About

Followers

Like Us

Labels

Donate us For Furture