views:

139

answers:

2
a:link { 
color: white; 
background-color: black;
text-decoration: none;
border: 2px solid white; 

}
a:visited { 
color: white; 
background-color: black;
text-decoration: none;
border: 2px solid white; 

}
a:hover {
color: black; 
background-color: white;
text-decoration: none;
border: 2px solid black; 
} 


Button :


<asp:LinkButton ID="A" runat="server" Text="A" OnClick="searchalpha" cssClass="a"></asp:LinkButton>&nbsp&nbsp

it's not working do you any solution for this...thank you

+4  A: 

The name of a class in CSS must start with a . (dot).

So your CSS should be

a.myclass:link{

}

etc.

and in the asp:LinkButton you can set the cssClass attribute to myclass

 <asp:LinkButton ID="A" runat="server" Text="A" OnClick="searchalpha" cssClass="myclass"></asp:LinkButton>
Vincent Ramdhanie
A: 

i don't know asp so I don't know what HTML is render by such a LinkButton tag.

But here I see that you set the cssClass to "a". Which means that the associated CSS class is

.a{ /* your style */ }
Guillaume Flandre