CSS button not styling
Posted
by o-logn
on Stack Overflow
See other posts from Stack Overflow
or by o-logn
Published on 2010-04-02T19:01:54Z
Indexed on
2010/04/02
19:03 UTC
Read the original article
Hit count: 350
Hey,
I must be missing something obvious, but can someone explain what I'm doing wrong with my CSS? I would like all buttons to have a certain format, except a few. I was expecting to use CssClass
in order to override the few that should be different, but they all seem to use the standard one.
My CSS:
.btn
{
border:none;
background-color:red;
}
input[type="submit"]
{
border: 2px solid black;
background-color:green;
}
All the buttons take the second value (green background, with a border). However, I have this button:
<asp:Button ID="btnAdd" CssClass="btn" runat="server" Text="Add" />
I was expecting this to have no border, and a red background, but it's the same as every other button.
Any ideas what I'm doing wrong? Thanks
© Stack Overflow or respective owner