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 8737011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:25:26+00:00 2026-06-13T10:25:26+00:00

I would like to color (i.e. highlight as erroneous) a select element, but not

  • 0

I would like to color (i.e. highlight as erroneous) a select element, but not its option tags. In FF I achieve this by applying a style to the select element and applying another style to the option tags. Here are the styles:

.highlight{
    background-color: #FB6F6E;
}

.highlight > option{
    background: #dfdfdf;
}

This looks as I want in FF (16.0.1),

enter image description here

but in IE8 (quirks mode) all options are colored:

enter image description here

So is there a way to achieve this in IE8?

EDIT I would preferably use something that does not involve giving classes to option tags or using javascript. I know those solutions work, but it feels sort of a hack. Maybe the DOCTYPE issue solves the problem, I just wonder if adding a DOCTYPE would alter the current design.

EDIT As some of you suggested, I have added a DOCTYPE (HTML 4.01 Transitional). IE8 is still in quirks mode, but the selectbox is rendered a little bit differently:

enter image description here

The border of the select is red, but still not the whole selectbox. Any ideas?

  • 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-06-13T10:25:27+00:00Added an answer on June 13, 2026 at 10:25 am

    Unfortunately I could not find a solution (that does not use javascript) for this problem.
    The client accepted the selectboxes as they are.

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

Sidebar

Related Questions

In this site I would like to highlight the type of sort on the
I have this code in jsfiddle and I would like the rows to highlight
I would like to highlight some portions of code with a specific background color,
I would like to color format the text printed to the console using the
I would like to extract a color histogram out of a BufferedImage (Java). I
I would like to change the color of the clearButton that appaers when you
I would like to change the color when a item of the spinner drop
I would like to change the background color of the row (to red) when
I would like to convert an image to 2-color, black and white using Java.
I would like to change the background color of the first row in a

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.