How To Disable Button With Css Code Example


Example 1: style disabled button


button:disabled,
button[disabled]
{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}

Example 2: css for disabled button


/* CSS Selectors for CSS2 and CSS3 both */
button:disabled,
button[disabled]
{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}

Example 3: on disabled attribute set button design change


<button id="btnSubmit" class="btn-disable">Click</button>

<style type="text/css">
.btn-disable

{
cursor: not-allowed;
pointer-events: none;

/*Button disabled - CSS color class*/
color: #c0c0c0;
background-color: #ffffff;

}
</style>

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable