Reputation: 2366
I'm having some difficulties applying styles to an asp:button. I've read a few posts on here and can't seem to apply what people are saying to my situation.
I have the following css setup for my href tags.
a.button { padding:6px;background:#4A6491;color:#FFF; border-radius: 10px 10px 10px 10px;margin:10px 2px;text-decoration:none;font-size:12px;text-transform:uppercase;font-weight:bold;border:2px solid transparent; }
a.button:hover { border:2px solid #fff; }
however I have an asp:button that is already wired up to do some login jazz that I would like to apply the exact same style but can't seem to get my styles to work.
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="LoginUserValidationGroup" />
Upvotes: 0
Views: 343
Reputation: 12894
Try the following:
a.button, input[type=submit] { padding:6px;background:#4A6491;color:#FFF; border-radius: 10px 10px 10px 10px;margin:10px 2px;text-decoration:none;font-size:12px;text-transform:uppercase;font-weight:bold;border:2px solid transparent; }
a.button:hover, input[type=submit]:hover { border:2px solid #fff; }
If wish to make the link and button behave in a similar fashion you may also want to add the cursor:pointer;
style to the first definition.
a.button, input[type=submit] { cursor:pointer; .... }
Upvotes: 1