<input disabled> color

Discussion in 'HTML' started by Jochen Fuhrmann, Jan 13, 2004.

  1. hi, is there a way to change the color settings of a disabled ellement? css?

    jochen
    Jochen Fuhrmann, Jan 13, 2004
    #1
    1. Advertising

  2. Jochen Fuhrmann wrote:
    > hi, is there a way to change the color settings of a disabled ellement? css?


    Sure, same as for all other elements.

    With a class:
    input.disabled {color:blue; background-color:lime;}

    <input class="disabled" disabled="disabled">

    With an attribute selector:
    input[disabled="disabled"] {color:blue; background-color:lime;}

    Selectors are explained here: <http://w3c.org/TR/CSS2/selector.html>

    Both attribute selectors and styling of form elements in general aren't
    supported by all browsers.


    Matthias
    Matthias Gutfeldt, Jan 13, 2004
    #2
    1. Advertising

  3. Jochen Fuhrmann

    brucie Guest

    in post <news:bu14vh$c0irg$-berlin.de>
    Matthias Gutfeldt said:

    > <input class="disabled" disabled="disabled">


    <input class="disabled" disabled>




    --
    brucie
    brucie, Jan 13, 2004
    #3
  4. Jochen Fuhrmann

    Cameron Guest

    brucie wrote:

    > in post <news:bu14vh$c0irg$-berlin.de>
    > Matthias Gutfeldt said:
    >
    >
    >><input class="disabled" disabled="disabled">

    >
    >
    > <input class="disabled" disabled>
    >


    Just general info, now in XHTML

    <input disabled>

    is not valid, it should now be written as...

    <input disabled="disabled">



    ~Cameron
    Cameron, Jan 13, 2004
    #4
  5. Jochen Fuhrmann

    Cameron Guest

    Cameron wrote:

    > brucie wrote:
    >
    >> in post <news:bu14vh$c0irg$-berlin.de>
    >> Matthias Gutfeldt said:
    >>
    >>
    >>> <input class="disabled" disabled="disabled">

    >>
    >>
    >>
    >> <input class="disabled" disabled>
    >>

    >
    >
    > Just general info, now in XHTML
    >
    > <input disabled>
    >
    > is not valid, it should now be written as...
    >
    > <input disabled="disabled">
    >
    >
    >
    > ~Cameron


    *Ahem* this will teach me to copy and paste ;)

    <input disabled="disabled">

    isn't valid in XHTML either ;)

    however

    <input disabled="disabled" />

    is ;)

    ~Cameron
    Cameron, Jan 13, 2004
    #5
  6. Jochen Fuhrmann

    brucie Guest

    in post <news:bu16d7$njn$>
    Cameron said:

    >>><input class="disabled" disabled="disabled">


    >> <input class="disabled" disabled>


    > Just general info, now in XHTML
    > <input disabled>
    > is not valid, it should now be written as...
    > <input disabled="disabled">


    thats not valid either



    --
    brucie
    brucie, Jan 13, 2004
    #6
  7. Jochen Fuhrmann

    Cameron Guest

    brucie wrote:

    > in post <news:bu16d7$njn$>
    > Cameron said:
    >
    >
    >>>><input class="disabled" disabled="disabled">

    >
    >
    >>><input class="disabled" disabled>

    >
    >
    >>Just general info, now in XHTML
    >><input disabled>
    >>is not valid, it should now be written as...
    >><input disabled="disabled">

    >
    >
    > thats not valid either
    >


    if you are referring to my missing / at the end see my other post at
    16:32, if not, what else did I miss?
    Cameron, Jan 13, 2004
    #7
  8. Toby A Inkster, Jan 13, 2004
    #8
  9. Jochen Fuhrmann

    jayvardhanpatil

    Joined:
    Apr 19, 2009
    Messages:
    1
    this may offer some help

    though I too is struggling with this, there are few things that are possible

    check here

    codeforfuture.com/2008/12/24/solution-changing-color-of-disabled-checkbox-or-radiobutton
    jayvardhanpatil, Apr 19, 2009
    #9
    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. Leo Duran
    Replies:
    0
    Views:
    894
    Leo Duran
    Aug 6, 2003
  2. ashutosh
    Replies:
    3
    Views:
    8,994
    Andrew Thompson
    Jun 16, 2005
  3. Romeyer Olivier
    Replies:
    12
    Views:
    10,998
  4. Martix
    Replies:
    4
    Views:
    1,513
    David Dorward
    Mar 31, 2007
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    411
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page