How to make a button look disabled

  • Hopefully this isn't too specific for here. I have the following button image that I use on my site

    enter image description here

    Here's an example with text:

    enter image description here

    This is rendered using the following CSS:

    input.borderlessButton {
        background: url("../Images/button.png") no-repeat scroll 0 0
    }
    

    In the HTML it's getting disabled

    <input type="submit" disabled/>
    

    This, obviously doesn't change the look as the image doesn't change. I can add a CSS :disabled pseudo class.

    But how's the best way to make the button above look disabled?

    All suggestions welcome.

    can you show an example of the button with text inside? genrally I use a grey version (a light grey) with darker grey text inside (not too dark) and also remove any interaction states e.g. hover

    Added text version @DaveHaigh. I suppose I could produce a grayscale version. This didn't occur to me, I must admit.

  • I think there are different options:

    • put it in greyscale (if enabled buttons are colourful)
    • make it lighter or put a transparant white overlay over it (if enabled buttons are generally dark)
    • make it flat (if enable buttons have a 3D kind of surface)
    • do not highlight the button when hovering over it (of enabled buttons have that behaviour)

    Or use a combination. Have some inspiration here: http://designmodo.github.io/Flat-UI/

    good advice here, using all relevant options from this list should suffice

    Improvement: the cursor on hover it should be the regular one

    @goto: Indeed. But I assume the html code takes care of that already and the question was purely about the design of the button itself. Obviously it should also not react when clicking on it.

    @goto Should disabled button upon hover look like regular?? Any reasoning for that?

    @Dmitri Zaitsev: the mouse cursor should remain "regular" i.e. not the pointing hand. The pointing hand must only appear on a thing which is clickable. Since a disabled button is not clickable, it must not appear.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used