Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:15:28+00:00 2026-05-27T05:15:28+00:00

::selection { background: #000000; opacity: 0 } ::-moz-selection { background: #000000; opacity: 0 }

  • 0
::selection { background: #000000; opacity: 0 }
::-moz-selection { background: #000000; opacity: 0 }

I want the select color on my website to be pure black, but my text is also pure black so when the text is selected it is hidden by the black selection. How can I change the text color to white when it is selected so that non-selected text appears as black text on the white background of the website while selected text appears as white text on a black selection? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:15:29+00:00Added an answer on May 27, 2026 at 5:15 am

    You can set color to white with CSS color property and remove opacity, because if it’s transparent then you can’t see it.

    ::selection { background: #000000; color: #ffffff; }
    ::-moz-selection { background: #000000; color: #ffffff; }
    

    Example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following lines are included in the HTML5 Boilerplate template by default: ::-moz-selection{background:#fe57a1;color:#fff;text-shadow:none;} ::selection{background:#fe57a1;color:#fff;text-shadow:none;}
/* ** ** custom select color ** ** */ ::selection { background: #525252; /*
::selection { background: #000000; color: #ffffff } Is resulting in a dark grey selection
I am currently changing the default background color of selected text. This works fine:
.box_content ::selection { background:#CCCC33; /* Safari */ } .box_content ::-moz-selection { background:#CCCC33; /* Firefox
I have a multiple selection SELECT field which I don't want the end user
I'm trying to color an item's (when selected) background. I'm working with the Android
I'm looking to create a color selection tool by binding the background color of
I want to style all my th elements the same (white text on black
I want to create a site with a background one color and the centered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.