2

I want to change color of link button so I made CSS like this:

.stylink 
a
{ font:10px; color:white;  }

a:hover
{ font:12px; color:#ff0; }

I have link button:

<asp:LinkButton ID="lbtn_gvinfo" runat="server" 
Text="arshad" CssClass="stylink" Font-Underline="false" ></asp:LinkButton>

This a:hover property of CSS works but a dosn't work. When I point cursor on link button it becomes yellow, but after that it remains blue.

3
  • @JaredReisinger how did u set background of text a:hover and a ? Commented May 2, 2013 at 3:00
  • You can use the background or background-color CSS properties. Commented May 2, 2013 at 17:41
  • Are you asking how "a:hover" and "a" got the background within StackOverflow itself (in the sentence after the code sample, above)? Commented Jul 9, 2013 at 22:45

2 Answers 2

1

Rather than a .stylink a selector, try .stylink a:link to set the color of a hyperlink. You may also wanted to take a look at the a:visited and a:active selectors to handle the "has already been clicked on or visited", and "has the current keyboard (tab) focus" cases, respectively.

Sign up to request clarification or add additional context in comments.

1 Comment

thanx for this but one more thing that i asked u in my comment that how do u set grey background posting question or comment on this site
1

Brother.. You can Apply Hover Like this.

.stylink 
{ font:10px; color:white;  }

.stylink:hover
{ font:12px; color:#ff0; }

Comments

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.