0

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"  />
0

1 Answer 1

1

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; .... }
Sign up to request clarification or add additional context in comments.

1 Comment

Right on the money, did exactly what i wanted it to! thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.