user131638
user131638

Reputation:

Disabled Buttons in CSS?

I'm trying to get a button which looks exactly the same whether it is enabled or disabled, but whenever I disable the button it seems to ignore any font styles I have set. This seems to be the case in IE but not other browsers.

So does anybody know the CSS to change a disabled button so that the font is not embossed?

Thanks in advance, Chris

[Edit] The CSS is as follows:

.Button
{
    background-color:#332F27;
    border-bottom-color:#1B1B1B;
    border-top-color:#3B3B3B;
    border-left-color:#3B3B3B;
    border-right-color:#0C0C0C; 
    color:Black;
    font-style:normal;
}

The button has the attribute Class="Button" [/Edit]

Upvotes: 5

Views: 21672

Answers (2)

Nikhil D
Nikhil D

Reputation: 2509

//You use this css it helps u
font-weight: bold;
    border-right: #3C8FD1 1px solid;
    border-top: #3C8FD1 1px solid;
    border-left: #3C8FD1 1px solid;
    border-bottom: #3C8FD1 1px solid;
    font-size: 10px;
    color: #045FA7;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    background-image: url(../App_Images/cssbuttonbg.gif);
    line-height: 14px;

Upvotes: 0

rahul
rahul

Reputation: 187030

If you are changing the disabled property of the button then you won't be able to get the feel and look of a normal button with CSS which will work in all browsers.

The easiest way is to add another button with no click event attached to it and set this button's display to inline and hide the original one.

If you still want to use CSS for this you can refer this link.

Styling disabled form controls with CSS

Upvotes: 10

Related Questions