14

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.

2
  • 4
    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
    – Dave Haigh
    Jan 23, 2014 at 10:29
  • Added text version @DaveHaigh. I suppose I could produce a grayscale version. This didn't occur to me, I must admit.
    – user40113
    Jan 23, 2014 at 10:33

3 Answers 3

14

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/

5
  • good advice here, using all relevant options from this list should suffice
    – Dave Haigh
    Jan 23, 2014 at 10:31
  • 2
    Improvement: the cursor on hover it should be the regular one
    – goto
    Jan 23, 2014 at 10:51
  • 1
    @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. Jan 23, 2014 at 10:53
  • @goto Should disabled button upon hover look like regular?? Any reasoning for that? Jul 31, 2014 at 5:48
  • @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. Jul 31, 2014 at 6:43
13

I often make use of opacity to make the buttons like as disabled:

button.buttonClassName:disabled {
    opacity: 0.3;
}

An example with your button pasted on stackoverflow and the same button with the opacity modified on Firebug to appear as a disabled button.

Normal (opacity: 1):
enter image description here
Disabled (opacity: 0.3):
enter image description here

2

Most designers think that greying out is always the best option for the disabled state of button. However, this approach often catches users off-guard because of the button’s enabled state looks nothing like the disabled one.

Let's understand first the purpose of disabling the button

  1. Inactive state
  2. Inform user that it won't work purposefully
  3. Should not be noticeable

I would suggest Reducing the opacity of the Primary button until it's unreadable.

  • Don't make surprise to users by changing to Primary color while greying out. Going grey out to colored is an unpredictable phenomenon for users
  • A transparent button blends with the background where the greyed-out button stands out.
  • Gray buttons are not easy to read for users that mistakenly perceive them for secondary actions.

source : https://uxmovement.com/buttons/why-you-shouldnt-gray-out-disabled-buttons/#:~:text=Going%20from%20gray%20to%20fully,opacity%20to%20make%20it%20transparent.

By making your disabled-buttons transparent, you can achieve all three goals I have mentioned above which is a must to have.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.