How can I apply this CSS to the asp.net?

G

Guest

Hi there,
I am converting ASP pages to asp.net pages.
The orignal anchor is:
<a class="nohover" href="..."> < img src="..." height="30" width="30"
border="0"></a>
I create an asp:hyper link for it:
<asp:hyperlink class="nohover" id="img" navigateurl=".." imgurl="..."
height="30" width="30" ></asp:hyperlink>

The .net rendered html is:
<A class="nohover" id="IMG" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH:
0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 30px; HEIGHT: 30px; BORDER-RIGHT-WIDTH:
0px" href="..."><IMG src="..." border=0></A>

The rendered style overwrite my "nohover" style class.
Can someone tell me how I can make my "nohover" work?

Thanks
 
K

Karl Seguin

seems to me that Visual Studio is screwing around with your tags..there's no
reason why it's rendering all that crap.

On a side note you can use CssClass instead of class. just class will work,
but only because unknown properties are rendered as-is into html attributes.
This won't fix your problem though.
 
G

Guest

Hi,
Sorry I mada a mistake. I do use CssClass in my asp:Hyperlink control.
I still can't apply "noHover" class to my image.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top