Results 1 to 2 of 2

Thread: CSS or JS: background-color of disabled textbox.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Canada
    Posts
    75

    CSS or JS: background-color of disabled textbox.

    any way to change the background color of a textbox depending on whether it is enabled or disabled?

    Any advice would be great...

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You should be able to do it like this:

    Code:
    input[type="input"] {
      background:black;
      color:white;
    }
    input[disabled][type="input"] {
      background:blue;
      color:black;
    }
    But I think once again IE doesn't support it, so you may have to do it via JS for IE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width