asp:menu control and underline on menuitem text

J

Jerry C

I am using a asp:menu control as a dropdown menu. the NavigateURL is blank. I
do not want the text in the menuitems to be underlined. I have set all the
underline properties to false and still the text is underlined like it was a
link. How can I get rid of the underline.

Thank you
 
M

Manish Bafna

Hi,
Have you tried setting the text-decoration property of the hyperlink style
to 'none'
 
W

Walter Wang [MSFT]

Hi Jerry,

If you create a simple web page and with a simple asp:Menu, you will find
the hyperlink is not underlined because of following CSS rules:


~~~~~

<style type="text/css">
.Menu1_0 {
background-color:white;visibility:hidden;display:none;position:absolute;left
:0px;top:0px; }
.Menu1_1 {
color:#7C6F57;font-family:Verdana;font-size:0.8em;text-decoration:none; }
.Menu1_2 {
color:#7C6F57;background-color:#F7F6F3;font-family:Verdana;font-size:0.8em;
}
.Menu1_3 { }
.Menu1_4 { padding:2px 5px 2px 5px; }
.Menu1_5 { }
...

<a class="Menu1_1 Menu1_5" href="javascript:__doPostBack('Menu1','New
Item\\New Item\\New Item')">New Item</a>

~~~~~~

Note the CSS class .Menu1_1 has "text-decoration:none", and the hyperlink
<a> has been applied two classes here: Menu1_1 and Menu1_5 here.


If your menu still has this underlined hyperlink in the menuitem, I think
the text-docoration:none css rule isn't applied. Please check the HTML
source of your web page. If in doubt, please post your source code of the
webform and the generated html source here. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top