I have an asp.net web form and I want to set the same background color to all the buttons in the form using CSS.This is what I have tried:
CSS:
body
{
background-color:#336699;
}
.button
{
background-color: #336699;
color: white;
}
.button:hover
{
background-color: White;
color :#336699
}
Page Source:
<head runat="server">
<title>Untitled Page</title>
<link href="../Layout.css" rel="stylesheet" type="text/css" />
</head>
Button Markup:
<asp:Button ID="btnSave" runat="server" Font-Bold="True" Height="40px"
OnClick="btnSave_Click" Text="Save"
Visible="False" Width="90px" />
The background color for the body is applied successfully,but for buttons this code is not working.Please let me know how to do this.
CssClass="button"to the<asp:Button>tag?