CSS3 ::selection selector - how to change background colour of selection (CSS)

CSS3 ::selection selector - how to change background colour of selection (CSS)

Did you notice that selected text on some websites has a different colour (not blue) as well? Not? That's because the vast majority of websites use the default color.

Changing the colour for some better one not only makes youru website look cooler, but it's also very effective way of improving your text's readability. I think that restylling the selecting color should always be a part of a web design. How to, you ask? CSS selector ::selection is what you're looking for.


Changing selection colour using CSS

All you need to know is the selector ::selection. For Mozilla Firefox, you have to use the mozilla prefix (moz-). The FF selector looks like this ::-moz-selection.

::selection         { styles }
::-moz-selection { styles }

Using CSS selector ::selection

It's pretty simple actually. If you look closely at any selected text and think about it for a while, you notice it's only background-color property (blue background) together with color property (white font).

On my website, I changed the background colour to green (#5fa94e) and set the text colour to white (#fff). The code for this tweak follows:

::selection         { background:#5fa94e; color: #fff; }
::-moz-selection { background:#5fa94e; color: #fff; }

 

<< Back to the previous page


Comments.
Pag.:
1 2 3
HP Support
0

Nice Post...
Why Is The HP Solution Center Not Working On My Device? To make the HP Solution Center work, you need to have Flash software active on your device. It is because the industry no longer supports Flash, you can’t use the HP Solution Center either on your computer. The printer management program was manufactured before 2010 for HP printers that let you manage all your printing and scanning tasks from one place. To manage your printing tasks, we suggest you install the Windows built-in drivers on your device.
HP Solution Center Download
HP Solution Center Download Windows 10
HP Solution Center Windows 10

Published on 03.03.2021 13:14:05, from United States
   Reply

chris demon
0

chris demon
0

<a href="https://www.iairtickets.com/airlines/jetblue-airlines-reservations-flights/">Jetblue Book a Flight</a>
<a href="https://www.iairtickets.com/spirit-airlines-reservations-number/">spirit airlines reservations</a>
<a href="https://www.iairtickets.com/allegiant-airlines-reservations/">Allegiant Airlines Book a Flight</a>

Published on 03.03.2021 10:37:40, from Anaheim
   Reply


james sean
0

Fmovies is one of the best websites to watch or download the latest movies and tv shows for free. To know give us a visit to our blog about fmovies.
Netflix is one of the most popular online video streaming platforms all over the world. which can be accessed just by paying for a monthly sub scrption account. To get more details about this feel free to visit Netflix login whenever you are free.

Published on 02.03.2021 19:13:17, from Miami Beach
   Reply

Jessy Jason
0

We are a team of highly experienced and well trained, those who provide a solution related to windstream email such as windstream email login, windstream net email login, windstream login and much more. For more info contact our support team to get instant assistance.

Published on 02.03.2021 14:37:07, from United States
   Reply

loginassist10
0

We are a team of highly experienced and well trained, those who provide a solution related to mediacom email such as mediacom webmail login, mediacom email login, mediacom login and much more. For more info contact our support team to get instant assistance.

Published on 02.03.2021 08:33:34, from United States
   Reply

Amazon.com/mytv
0

To see online prime movies on apparatus such as laptops, computers, smartphones, along with smart television. You have to enter the 6 digit amazon activation code in www.amazon.com/mytv or even primevideo.com/mytv to observe the prime movie at no cost. View amazon prime episodes on your own apparatus to register in or make a new amazon account utilizing password and email.

amazon.com/mytv
amazon.com/mytv
www.amazon.com/mytv
amazon.com/code
amazon.com/mytv enter my code
www.amazon.com/mytv enter code
www.amazon.com/mytv login
mytv
amazon.com/us/code
amazon.com/mytv

Published on 02.03.2021 05:59:00, from New York City, New York, United States
   Reply

Southwest Vacations
0

It takes a lot of efforts in providing the services of carrying the largest number of people at such affordable rates. This is why the Southwest airlines are such a popular and well-known name in the field of aviation. This is one of the entirely customer-friendly and affordable travelling services providers via airways.
You can get to see a large variety of facilities and perks that add to their advantages and make the travel with them one of the best and cost-effective trip. Although you can refer to the information manual and quickly get the full information at the Southwest Airlines Reservations Phone Number (1+888-854-1953), these are some points to describe the importance of them.https://www.farepapa.com/

Published on 01.03.2021 14:30:59, from New York
   Reply


anisa
0

Hey i am Anisa John. I am technical advisor. When you have a problem that you cannot resolve, the resource of last resort is your Cisco Systems technical support representative.To analyze a problem, your technical support representative will need certain information about the situation and the symptoms that you are experiencing. To speed up the problem isolation and resolution process, collect the necessary data before you contact your representative. This appendix describes how to collect relevant information about your inter-network and how to present that information to your technical support representative. Refer to the appropriate chapter within this book for specific information that you need to collect for each technology. We are providing installation, uninstall, updates, virus removal, router and ect. antivirus customer support team is 24x7 available to any antivirus users. Navman Update | Navman GPS | Garmin.com/Express | install garmin express | Download Garmin Express | Garmin Update | garmin-gps-update | Garmin Nuvi Update | Garmin.com/mapupdates | Garmin Lifetime Maps Update | belkin range extender setup | Belkin Login | Belkin Router Login | Belkin.Range | Belkin.Setup | belkin n300 setup | Mywifiext | Mywifiext.net Login | Mywifiext.net | www.mywifiext.net | Mywifiext net | 192.168.1.250 | Netgear Router Setup | RouterLogin Netgear | Netgear Login | Netgear Router Login | Netgear Genie Download | Netgear Extender Login | Netgear WiFi Extender Setup | Netgear Extender Setup Router Login | routerlogin.com | www.routerlogin.net Setup | www.routerlogin.net | Netgear EX7000 Setup

Published on 27.02.2021 10:30:54, from United state
   Reply

Eva Jones
0

Well explained blog the first step toward a sound reputation is deciding how you want your business to be perceived. Click now for PayPal Login
<a href="https://paypal-login.jimdosite.com/"> PayPal Login </a>

Published on 24.02.2021 12:51:08, from Boston
   Reply

yvonna pmarketst
0

While an antivirus program like Avast are often helpful in blocking harmful malware or viruses from getting onto your computer, at other times they will block you from running programs or applications that you simply know are safe, or they were preinstalled on your computer and you would like to settle on a special option.
<a href="https://advisers4u.com/verizon-store-near-me/">verizon store near me</a> |
<a href="https://advisers4u.com/pest-control-near-me/">pest control near me</a> |
<a href="https://advisers4u.com/amazoncommypvc/">amazon.com/mypvc</a> |
<a href="https://advisers4u.com/mycleanpc-activation-code/">mycleanpc activation code</a> |
<a href="https://advisers4u.com/post-office-near-me/">post office near me</a> |
<a href="https://advisers4u.com/50-most-popular-women/">most popular women</a> |
<a href="https://advisers4u.com/amazon-usa/">amazon usa</a> |
<a href="https://advisers4u.com/24-hour-fitness-near-me/">24 hour fitness near me</a> |
<a href="https://advisers4u.com/part-time-jobs-near-me/">part time jobs near me</a> |
<a href="https://advisers4u.com/how-to-change-snapchat-username/">how to change snapchat username</a> |
<a href="https://advisers4u.com/laser-hair-removal-near-me/">aser hair removal near me</a> |
<a href="https://advisers4u.com/walmart-laptops/">walmart laptops</a> |
<a href="https://advisers4u.com/yahoo-homepage/">yahoo homepage</a> |
<a href="https://advisers4u.com/amazon-message-center/">amazon message center</a> |
<a href="https://advisers4u.com/how-to-turn-off-avast/">how to turn off avast</a> |
<a href="https://advisers4u.com/ps4-safe-mode/">ps4 safe mode</a> |
<a href="https://advisers4u.com/paypal-resolution-center/">paypal resolution center</a> |
<a href="https://advisers4u.com/watch-food-network-com-activate/">watch.food network.com/activate</a>
<a href="https://advisers4u.com/support-apple-com-iphone-restore/">Support.apple.com/iphone/restore</a> |
<a href="https://advisers4u.com/wwwwellcarecompdp/">www.wellcare.com/pdp</a> |
<a href="https://advisers4u.com/myindigocard/">myindigocard</a> |
<a href="https://advisers4u.com/roblox-shutting-down/">roblox shutting down</a> |
<a href="https://advisers4u.com/dishanywherecomactivate/">dishanywherecom/activate</a> |
<a href="https://advisers4u.com/wellsfargocomactivatecard/">wellsfargo/activatecard</a> |
<a href="https://advisers4u.com/tntdramacomactivate/">tntdrama.com/activate</a> |
<a href="https://advisers4u.com/firestick-remote-not-working/">firestick remote not working</a> |
<a href="https://advisers4u.com/aka-ms-remoteconnect/">aka.ms/remoteconnect</a> |
<a href="https://advisers4u.com/402-935-7733/">402-935-7733</a> |
<a href="https://advisers4u.com/how-does-venmo-work/">how does venmo work</a> |
<a href="https://advisers4u.com/tubitvactivate/">tubi.tv/activate</a> |
<a href="https://advisers4u.com/primevideocommytv/">primevedio.com/mytv</a> |
<a href="https://advisers4u.com/how-to-cancel-amazon-prime-membership/">how to cancel amazon prime membership</a> |
<a href="https://advisers4u.com/pluto-tv-activate/">pluto.tv/activate</a> |
<a href="https://advisers4u.com/showtimeanytime-com-activate/">showtimeanytime.com/activate</a> |
<a href="https://advisers4u.com/myhr-cvs/">MyHR CVS</a> |
<a href="https://advisers4u.com/cox-email-login/">cox email login</a> |
<a href="https://advisers4u.com/playstation-vue-activate/">playstation vue activate</a> |
<a href="https://advisers4u.com/activate-starz/">activate starz</a> |
<a href="https://advisers4u.com/audio-renderer-error/">audio renderer error</a> |
<a href="https://advisers4u.com/usaa-com-activate/">usaa.com/activate</a> |

Published on 24.02.2021 11:29:42, from new york
   Reply

mailchimp login
0

As you know, Amazon Prime is a good way to spend time at home. You want to watch top High-quality web series and movies? Just Visit www.amazon.com/mytv and activate Amazon mytv today for happy and entertaining life.
<a href="https://amazoncommytvs.sitey.me/">www.amazon.com/mytv</a>

Published on 22.02.2021 10:24:56, from miami
   Reply

mailchimp login
0

See less For Everyone asking if Netflix, Hulu, YouTube tv are free through amazon prime
primevideo.com/mytv

Published on 22.02.2021 10:12:06, from miami
   Reply

TIM
0

[link=https://sites.google.com/view/hbomaxtvsign786/]HBOMAX.COM/TVSIGNIN[/link]

Published on 22.02.2021 07:09:47, from new york
   Reply

JORDAN
0

To activate your HBOmax visit hbomax.com/tvsignin and follow the activation process.
<a href="https://sites.google.com/view/hbomaxtvsign786//">hbomax.com/tvsignin</a>

Published on 22.02.2021 07:07:41, from new york
   Reply

JORDAN
0

To activate your HBOmax visit hbomax.com/tvsignin and follow the activation process.
<a href="https://sites.google.com/view/hbomaxtvsign786//">hbomax.com/tvsignin</a>
https://sites.google.com/view/hbomaxtvsign786

Published on 22.02.2021 07:05:37, from new york
   Reply

primevideo.com/mytv
-1

Amazon provides one of the ideal quality of all videos. Additionally, it provides one of the greatest sound quality which other devices do not provide. It is also possible to delight in the stations that you would like to see.primevideo.com/mytv
primevideo.com/mytv
primevideo.com/mytv
primevideo.com/mytv
primevideo.com/mytv register
primevideo.com/mytv register device
primevideo.com/mytv enter code

Published on 22.02.2021 07:04:27, from United States
   Reply

alpha
0

To activate your HBOmax visit hbomax.com/tvsignin and follow the activation process.
<a href="https://sites.google.com/view/hbomaxtvsign786//">hbomax.com/tvsignin</a>

Published on 22.02.2021 07:04:26, from new york
   Reply

waanderson
0

Cash App has introduced its own debit card that can be used just like any other bank debit card. The Cash App card is known as Cash Card and can be used to make payments, shop at merchants or even withdraw cash from an ATM-like any traditional bank debit card. The Cash Card is linked to the Cash App account so money is debited from your Cash App account and not your bank account.
protonmail login |
SBCGlobal Email Login |

Kaspersky Login |
quickbook login |
cash app login |
yahoo mail login |
yahoo mail sign in

Published on 19.02.2021 10:13:53, from miami
   Reply

discovery.com/activate
0

So Mailchimp software sends email newsletters to all the people who subscribe to the mailing list of your business about what is going new with your business and other updates regarding your business. It helps in boosting your marketing efforts in minimal time and cost.
<a href="https://sites.google.com/view/mailchimps-logins/">mailchimp login</a>

Published on 19.02.2021 07:56:55
   Reply

Alice Marvel
0

Thanks for sharing your amazing thoughts. It’s really nice and well explained blog. Are you looking for robinhood login
robinhood login
cash app customer service

Published on 19.02.2021 07:27:10, from Boston
   Reply

Ethan Leo
0

Thankful to you for giving to us, I additionally reliably increase some new helpful information from your post. I always like to read a quality content having accurate information regarding the subject.

NBA Streams Reddit

Pronhub

youtube.com/activate

Published on 16.02.2021 17:10:48, from USA
   Reply

jameswick11
0

Our Online coursework help USA experts have attained a lucid style of writing. They can compile essays in any style of writing if aspirants specify their requirements. Our professionals are highly adaptable. They have a significant eye for writing essays or assignments.

Published on 16.02.2021 06:56:16, from New York, NY, USA
   Reply

waren jack
0

This is really a shocking article. Much appreciated for sharing a piece of incredible information keep it up and most astonishing perspective karma with your future article and post.
icloud mail login
pluto.tv/activate

Published on 15.02.2021 20:36:05
   Reply

Jennifer Jenny
0

Hi! this is nice article you shared with great information. Thanks for giving such a wonderful informative information. I hope you will publish again such type of post. Also, please check out about PayPal Login PayPal Login PayPal Customer Service.

Published on 15.02.2021 11:28:29
   Reply

Alice Marvel
0

Well explained blog the first step toward a sound reputation is deciding how you want your business to be perceived. Click now for Outlook 365 Login
Outlook 365 Login

Published on 15.02.2021 04:50:37
   Reply

www.webroot.com/safe
0

Go to www.webroot.com/safe website from your browser. Enter Your Email address, Enter your Webroot Keycode. Accept the Agree and Install button to proceed.
Finally your webroot safe is activated successfully.

Published on 13.02.2021 09:13:44, from india
   Reply

mytv code
0

Enter the Amazon mytv code and click on register my device at www.amazon.com/mytv this process to register the device is completed successfully You can enjoy watching your favorite video content on.you need to find the amazon mytv activation code and then enter the code to activate it.

Published on 12.02.2021 17:52:37, from usa
   Reply

sam hatter
0

Enter the Amazon mytv code and click on register my device at <a href="https://amazon-mycode.com/">www.amazon.com/mytv</a> this process to register the device is completed successfully You can enjoy watching your favorite video content on.you need to find the amazon mytv activation code and then enter the code to activate it.

Published on 12.02.2021 17:51:35, from New York
   Reply

Alice Marvel
0

Well explained blog the first step toward a sound reputation is deciding how you want your business to be perceived. Click now for Outlook 365 Login
<a href="https://sites.google.com/view/outlook-365-logins/"> Outlook 365 Login </a>

Published on 12.02.2021 13:23:27, from Boston
   Reply

jackbuffett
0

I obligation of appreciation is all together for offering such edifying web diary to us. I should state you are an incomprehensible writer, I love the way that you.

portray the things. If you need I any character progression expert than connect with us at. Norton.com/setup | office.com/setup | Office.com/setup | Mcafee.com/activate

Published on 12.02.2021 09:51:54
   Reply

johnson fernandiz
0

Blog remarking is something that assists with getting quality backlinks for your site. BellSouth administrations are a piece of innovation. What's more, actually, they become testing now and again. In any case no uncertainty BellSouth email Login offers premium quality support to the clients. Yet, as we can't deny the way that there are a few BellSouth email Login, not working issues.
for more info:- https://sites.google.com/view/bellsouthemailloginpage/

Published on 11.02.2021 05:15:53, from fg
   Reply

aol mail login
0
Published on 09.02.2021 10:12:11, from miami beach
   Reply

Ethan Leo
0

Great information you shared through this blog. Keep it up and best of luck for your future blogs and posts.
<a href="https://sites.google.com/view/wwwamazoncomcodes/">www.amazon.com/code verification</a> | <a href="http://sites.google.com/view/outube-com-activate/">youtube.com/activate</a> |
<a href="http://sites.google.com/view/pluto-tv-activates/">pluto.tv/activate</a>

Published on 05.02.2021 18:36:06, from Taytay
   Reply

Jennifer Jenny
0

Hi! this is nice article you shared with great information. Thanks for giving such a wonderful informative information. I hope you will publish again such type of post. Also, please check out about PayPal Login | PayPal Login | PayPal Phone Number | Geek Squad Appointment | Cash App Login | HP Instant Ink | Garmin Express | Roku.com/link | AOL Mail Login.

Published on 05.02.2021 09:32:42, from Orlando
   Reply

John Adward
0

Get the quick and easy steps to access mcafee web boost and boost the performance along with the speed of your PC. Make sure you follow the steps carefully.

Go to mcafee.com/activate and download the desired package to protect your Mac, PC, and mobile device against potential malware, viruses, spyware, etc.

PayPal login is an online platform from where you can easily access your PayPal account login and start making online transactions at a grocery store, pay for movie tickets, and do more. If you have PayPal by your side, you can easily make payments through credit card, bank account, PayPal account, and so on.

Published on 05.02.2021 08:15:53, from Miami, FL, USA
   Reply

waren jack
0

I think this is a helpful post and it is especially important and learned. thusly, I should thank you for the undertakings you have made recorded as a printed copy this article. 192.168.0.1
192.168.1.1

Published on 05.02.2021 02:01:03, from Miami
   Reply

john edward
0

Epson connect printer setup utility enables you to enjoy remote printing on the go without the hurdles of connecting your printer with cables and then print.

To cancel your mcafee sub scrption go to the home page of McAfee, login, tap on 'My Account', and then scroll down to find the auto-renewal option and disable it.

roku.com/link: Learn the quick essential steps to play your favorite arcade games on a roku games streaming device. Play and watch the content on Roku streaming channels.
visit:hbo max on roku

Published on 03.02.2021 12:23:04, from miami
   Reply

Paul Troy
0

Thank you for sharing your info. I really appreciate your efforts and Thanks a lot for sharing a piece of wonderful information which I am looking for a longer period of time.
Mcafee.com/activate | Aol Mail Login | Cash app login

Published on 03.02.2021 08:23:58, from USA
   Reply

Jacob liam
0

It is easy to write your whole essay but when it comes to writing a conclusion you might get tired of writing and end up taking essay assignment help. Here are some steps that will help you to make an effective and strong essay conclusion on your own.

Published on 02.02.2021 12:00:40, from Los Angeles, California
   Reply

jammi guns
0

Assignment help is made available easily through the digital mediums of communication. A customized expert assignment is available as per the student’s needs and requirements and delivered in time consistently. Students find it convenient to have 24/7 assistance from experts, which they often fail to get from the classroom. For students pursuing education in a non-classroom model, expert assistance and professional help becomes very difficult to get. Online assignment helps solve that problem for students since it is available whenever, wherever and however the students want.

Published on 30.01.2021 15:01:47, from usa
   Reply

Ricky
0

Do you need the best assignment help service from professional Assignment Helper writers? You can look for guidance and support from experts. If you are not able to finish the assignment, homework, or need any assignment or essay help service, then we can help you. Our assignment help writers have outstanding skills in writing assignments and essays. Sometimes aspirants face challenges in delivering the assignment with the quality that people demand, but we can do it on your behalf.

Published on 30.01.2021 11:45:55, from New York
   Reply

harryporter
0
Published on 30.01.2021 06:02:41, from usa
   Reply


Anisa
0

customer support are needed since an antivirus software program can create problems to a computer during the software installation processes. The antivirus software when installed into a computer will alter and reconfigure the original configuration of the computer. Configurations that dictates and control how the computer will behave and operate.. The antivirus programs with the way they were made, most the time they will take control and dictate how the computer will behave and by doing so, the program introduces some bugs, problems or behavioral changes in the computer which the owner is not quite familiar with and thus will need a customer support to help address the issue and concerns as created by the company antivirus product. Garmin.com/Express | rand mcnally dock | Magellan GPS Update| Mywifiext | Garmin Lifetime Maps Update | rand mcnally maps | Garmin.com/express | www.mywifiext.net | Netgear Extender Login | Navman Update | belkin router setup | belkin ac1200, belkin ac1200 router | Rand Mcnally Dock Update | Navman GPS | Canon.com/ijsetup | Ij.Start.Canon | Magellan GPS

Published on 27.01.2021 11:22:49, from London
   Reply

www.aolmail.com
0

Yes! You will need a Roku account to activate your Roku device and get all the favorite channels and TV programs. roku sign in
____________________________________________________________________________________
Are you thrilled to stream the most entertaining channels on Roku? roku.com/link
_________________________________________________________________________________
The country's flag carrier, Qatar Airways (QR) was founded in 1993. It is wholly owned by the government of Qatar. Qatar Airways Customer Service
_____________________________________________________________________________________
Delta Airlines is one of the most famous airlines in the United States for more than 80 years. Delta Airlines Contact Number
_____________________________________________________________________________________
When using roadrunner, commonly, you will get Roadrunner Email. But as roadrunner has the best service for emails
__________________________________________________________________________________
A user can face a lot of errors while using a roadrunner email issue. It is important to understand the reason behind the problems. roadrunner email problems
____________________________________________________________________________________

Published on 27.01.2021 09:52:00, from miami
   Reply

drawings
0

Ensure the printer is on and associated with work area or PC. Snap HP Print and Scan Doctor on the HP Customer Support page to download the investigator. ... Snap Start and select the printer that doesn't check. Select the Fix Scanning alternative.
www.aolmail.com | aol mail login | aolmail.com | aol mail | aol login | aolmaillogin | 123.hp.com/setup | 123.hp.com | hp printer drivers | hp printer | 123 hp | hp printers | cash app login | amazon prime login | yahoo mail login | yahoo mail |
yahoo mail sign in | quickbooks online login | office.com/setup | office setup | juno mail login | juno mail | juno email login | plex.tv/link | tubi.tv/activate |
showtimeanytime/activate | showtimeanytime.com/activate | aol mail | aol login | my aol mail login

Published on 25.01.2021 23:34:14, from miami
   Reply

john
0

Get a FREE mcafee account and technical support for your McAfee consumer products and services. Find solutions to top issues online. Live support via chat and phones via mcafee my account

Published on 21.01.2021 07:59:49, from miami
   Reply

Write a comment
 If you cann't see the verification code clearly.
Type the characters into the text field below(*)
 
This website uses cookies for ads, just like any other website. Further information