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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:35:22+00:00 2026-06-18T03:35:22+00:00

In all major browsers except IE9, it colors a disabled option’s text to red

  • 0

In all major browsers except IE9, it colors a disabled option’s text to red this code:

<option disabled='disabled' class='red' value=''>No Students available to take up Assessment</option>

...
//CSS
.red{
color:red;
}

But in IE, it does not changed text color, it keeps it a grey disabled color. How can I get the disabled color to change in IE9?

  • 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-18T03:35:24+00:00Added an answer on June 18, 2026 at 3:35 am

    Something like this?

    select :disabled.red {
        color: red;
    }
    

    Here’s a document about the :disabled pseudo-class from Microsoft.

    Here’s a fiddle that should work in IE9 and up.


    Update: This seems to work only in IE>8. This answer points out the workaround of using the readonly attribute on form elements. That’s not an option for the option tag though.

    There are JavaScript workaround for old IEs around. A simple Google search led me to this site which provides a jQuery solution.

    From the blog:

    By adding a little css styling magic and you end up with an identical
    outcome in all other modern browsers.

    You can then enable and disable using javascript. Many people have
    written code which makes an option look like it’s disabled, waits for
    a click on the option element and then bluring it or focusing the next
    / previously selected option to make it act like it’s disabled.

    I have come up with functions used with jQuery to disable / enable a
    select option by converting it to an optgroup and back. It is tested
    in firefox 2 & 3, safari 3, ie 6 + 7, and it works in Opera 9
    (although the opgroups jump to the bottom)

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

Sidebar

Related Questions

My code works in all major browsers, except for Google Chrome, where it's acting
Is this code safe in all major browsers? var string = '123' alert(string[1] ==
Most major browsers except IE9: http://jsfiddle.net/tdoherty/nxB39/ If I step trough the code from the
http://jsfiddle.net/zerkms/4zJyw/1/ In all major browsers, except of IE7, the example works as expected -
So, I'm making this context menus, which looks great in all major browsers, even
window.oncontextmenu = function() { return false; }; Will this work on all major browsers
For all major browsers (except IE), the JavaScript onload event doesn’t fire when the
I have a menu working in all major browsers except IE7 and IE8. Here
All major browsers except FF render images with invalid src attribute within it's dimensions
I have almost created a website that works in all major browsers flawlessly. Yesterday,

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.