Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Disable input using CSS

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #39142
    garrulinae
    Member

    Does anyone know if there is something tricky I can do to disable a form input using CSS? I’m building a Wufoo form, so I don’t have access to the HTML attributes and JavaScript isn’t at my disposal either.

    #107067

    You could use pointer-events: none; but it won’t work in IE or Opera.

    Another option you have is to position an element over the top of the input. You can do this using pseudo-elements, but only on the parent element, as the input itself can’t have pseudo-elements: http://jsfiddle.net/joshnh/DcQ8N/

    Keep in mind that this won’t work in IE7 or below, and that this might also affect other child elements.

    #107074
    matthewb
    Member



    This will work in ie8 and ie9 too.

    or you can also do some css :

    #107076
    matthewb
    Member

    input[type="text"]:disabled
    {
    background:#dddddd;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.