CSS trick to change the color of selected text on any web page

The easiest way to change the color of selected text on any web page is using pure CSS trick which you might not know. Working on some project , today , i find a trick to change the color of selected text. 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 green color in place of indigo. ( which is default color ). I simply added four lines of CSS and all it happens.

Here is the trick. Simply copy and paste the following CSS into your stylesheet and see the magic.


This property is not supported by IE

All done!!

Recently Published


10 Best HTML5 Frameworks For Hybrid App Development

Hybrid apps are generally built around native web view container or ...


A Look at The Evolution Of WordPress and What Future Holds For It

When it comes to developing a website, WordPress is the first name ...


7 WordPress Plugins That Make Your Site Mobile Responsive

Not much in the recent past, having a responsive website that works ...


Things you should Consider When You Are Designing an E-commerce Website

The people of today’s generation have discovered the various ...


Developing a Mobile App Using Open Source Software? Consider These Tips For Security

Today, almost every IT organization (including the Fortune 500 ...


5 CSS Tools You Shouldn’t Miss As a Web Designer and Developer

It’s no secret that CSS (Cascading Style Sheets) is the key to ...


10 Awesome Live Chat Plugins for WordPress

Patronage by loyal customers yields 65 percent of a typical ...


10 High-Grade Premium Drupal Themes Worth A Quick Install

Serving as the perfect tools for enhancing your Drupal ...


A Comprehensive Guide For Setting Up Magento 2

The much speculated beta version of the Magento 2 has been finally ...