Jump to content

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


imgrooot

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.