I am facing an issue with the styling of my asp:Button. I have applied CSS styles using the cssClass property, but they are not being applied correctly. Surprisingly, when I switch to using asp:LinkButton, the styles work perfectly fine. I prefer not to use any themes or skins for styling.
Below is a snippet of my asp page:
<asp:Button CssClass="smallButton" Text="Sign In" runat="server" ID="submit"></asp:Button>
This is the CSS I have used:
.smallButton
{
//styles
}
Whenever I replace asp:Button with asp:LinkButton like this:
<asp:LinkButton Text="Sign In" runat="server" ID="submit" CssClass="smallButton"></asp:LinkButton>
or in this way:
<span class="smallButton"><asp:LinkButton Text="Sign In" runat="server" ID="submit"></asp:LinkButton></span>
the styles work perfectly fine. The issue only arises with the asp:Button control