Hi,
You cannot do that like you post.
You can do like this:
You ca put the link in div,
<div id="div">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.google.com">HyperLink</asp:HyperLink>
</div>
then you can define the link's style of the div, like below:
#div a
{
background: yellow;
}
#div a:link
{
color: green;
}
#div a:visited
{
color: blue;
background-color: Green;
}
#div a:hover
{
color: orange;
background: olive;
border-color: #3c719e;
text-decoration: underline;
}
#div a:active
{
background: red;
border-bottom: 1px solid white;
}
Hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support