asp:menu control and underline on menuitem text

Discussion in 'ASP .Net Web Controls' started by Jerry C, May 1, 2007.

  1. Jerry C

    Jerry C Guest

    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
    Jerry C, May 1, 2007
    #1
    1. Advertising

  2. Jerry C

    Manish Bafna Guest

    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.



    "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
    Manish Bafna, May 2, 2007
    #2
    1. Advertising

  3. 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 (, 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.
    Walter Wang [MSFT], May 2, 2007
    #3
  4. Jerry C

    Jerry C Guest

    Thank you all. Working with the css worked

    Thank you,
    --
    Jerry


    "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
    Jerry C, May 2, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rickie
    Replies:
    11
    Views:
    5,346
    Edwin Knoppert
    Jul 7, 2006
  2. =?Utf-8?B?RGF2ZQ==?=

    Programmatically select a MenuItem in Menu control?

    =?Utf-8?B?RGF2ZQ==?=, Jul 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    14,394
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=
    Jul 27, 2006
  3. Replies:
    1
    Views:
    1,138
  4. alexandis
    Replies:
    2
    Views:
    582
    alexandis
    Feb 4, 2008
  5. Rickie
    Replies:
    11
    Views:
    473
    Edwin Knoppert
    Jul 7, 2006
Loading...

Share This Page