CSS disable button Codes Examples
Disabled button CSS is a set of classes that you can use to style your disabled buttons. The best thing about it is that it is fully responsive and will adapt to any screen size or device. Why do you need disabled button CSS? You need it because of the lack of standardization of what a disabled button looks like. That's why I created this set of classes for you. The disabled button is a simple style that is based on the normal button. The main difference is that when you click, it does not react in any way.
style disabled button
button:disabled,
button[disabled]{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}
html button disabled
<button type="button" disabled>This button is disabled</button>
css for disabled button
/* CSS Selectors for CSS2 and CSS3 both */
button:disabled,
button[disabled]{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}
There are many uses for this type of button, for example, when you want to show content but do not want the user to be able to interact with it until a certain time or condition has been met. Above I have mentioned the code for disable button