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

  • SEARCH
  • Home
  • 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 531183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:16:26+00:00 2026-05-13T09:16:26+00:00

Supposing no CSS, javascript or other HTML trickery, how does the browser determine the

  • 0

Supposing no CSS, javascript or other HTML trickery, how does the browser determine the color of the text and background for selected text?

For example, standard white background (#FFFFFF or RGB=255,255,255) with black text (#000000 or RGB=0,0,0) when selected with invert the colors (i.e. black background, white text). How are other colors chosen? For example, when writing a question on this site, the right sidebar has an area “How to ask” with background #FFEFC6 and text #AE0000, which when selected become #3399FF and #FFFFFF respectively.

I would like to know how this is determined (is there an algorithm or just defaults) and is this the same across browsers?

  • 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-13T09:16:27+00:00Added an answer on May 13, 2026 at 9:16 am

    I’d agree with Joshua that the colors come from the system, but I’d disagree about CSS, for example, CSS-Tricks:

    ::selection { background: #ffcc89; color: #222; }
    ::-moz-selection { background: #ffcc89; color: #222; }
    

    For more info, see Quirksmode on selection styles.

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

Sidebar

Related Questions

Supposing I'm setting a background image for a web page in CSS like this:
Has anyone else noticed that IE9's standard implementation of CSS box-shadow differs from other
Supposing that memory is not an issue does targeting a 64 bit OS make
Here's a live example I am attempting to create modules whose markup and CSS
Supposing I have a hex color code in a string such as: $color =
I have an anchor with a background. The anchors has text inside it. However,
You can use more than one css class in an HTML tag in current
Supposing I have a StringerHelper(Component|Helper|Behaviour).php class with a method for random strings. I might
Supposing I have 3 tables: Users, Roles and UserRoles. I can fetch the user_roles
Supposing I was developing a fairly graphically intensive application (C++ or C#, graphics API

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.