Jump to content

is there a way to add a different color for the select disabled option?


Recommended Posts

I want to change the color of an option that's disabled. By default it's showing grey. 

<option disabled="true" class="disabled">Heading One</option>

I tried using the "disabled" class to change the color but it doesn't work. But for some reason I can change it's size.

Is there a way around this that would work in all browsers?

You can make it a color that's really close to black.  For example, rgb(0,0,1);

A person wouldn't be able to tell the difference.  It's not rgb(0,0,0) though so the browser doesn't change it to the normal disabled gray.

 

18 hours ago, kicken said:

You can make it a color that's really close to black.  For example, rgb(0,0,1);

A person wouldn't be able to tell the difference.  It's not rgb(0,0,0) though so the browser doesn't change it to the normal disabled gray.

 

That's good to know.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.