Home All Groups Group Topic Archive Search About

asp:menu control and underline on menuitem text

Author
1 May 2007 7:43 PM
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
--
Jerry

Author
2 May 2007 4:45 AM
Manish Bafna
Hi,
Have you tried setting the text-decoration property of the hyperlink style
to 'none'
--
If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



Show quoteHide quote
"Jerry C" wrote:

> 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
> --
> Jerry
Author
2 May 2007 6:52 AM
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 (waw***@online.microsoft.com, 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.
Author
2 May 2007 2:55 PM
Jerry C
Thank you all. Working with the css worked

Thank you,
--
Jerry


Show quoteHide quote
"Jerry C" wrote:

> 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
> --
> Jerry