DropdownList.Enabled = False and Font Color?

Discussion in 'ASP .Net' started by Brian McCullough, Jun 12, 2007.

  1. Hello,

    I need to be able to modify the font color of the text displayed within a
    disabled DropdownList (i.e. <select>). I have tried adding the following to
    my css:

    select[disabled]{
    color:red;
    }

    The above renders "correctly" on the latest version of Firefox, but not in
    IE 6 or 7. When I say "correctly", I mean that any disabled select elements
    (i.e. <select disabled="disabled">) are disabled on the browser window, but
    the font color is correctly displayed as Red in Firefox (but not IE).

    I have tried several different variations of this to try and work with IE,
    but no luck. My next course of action is to try to create a style that will
    mimic the "disabled" look of a select element, but I have concerns about
    preventing a user from changing the value in the dropdown (select elements
    don't support the readonly attribute).

    Anyone come across this situation? Any ideas?
     
    Brian McCullough, Jun 12, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabor
    Replies:
    3
    Views:
    660
    Jacob Yang [MSFT]
    Aug 26, 2003
  2. =?Utf-8?B?UmVraGE=?=
    Replies:
    7
    Views:
    3,352
    Eswar
    Mar 26, 2007
  3. mttc
    Replies:
    2
    Views:
    2,459
    Roedy Green
    Jul 3, 2009
  4. Tim Ebert

    Format Font Color in DropDownList

    Tim Ebert, Jun 10, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    148
    Tim Ebert
    Jun 10, 2004
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    478
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page