2.0 menu control and color

Discussion in 'ASP .Net Web Controls' started by Trapulo, Dec 5, 2005.

  1. Trapulo

    Trapulo Guest

    I've created a menu control, that I use in my master page. I've a problem,
    because my pages use a css that define a color for "A" tags that is
    invisible over menu background. So I need that all menu's item have white as
    forecolor, but I cannot make this. I've tried to set to "white" all
    "forecolor" properties defined for the menu, but I've still links rendered
    with same color defined in css.

    How can I force links created by menu control to have a specific color,
    different from default's one?

    thanks
    Trapulo, Dec 5, 2005
    #1
    1. Advertising

  2. Hi Trapulo,

    Welcome to ASPNET newsgroup.
    As for the css hyperlink style applying problem you met, based on my
    experience, as for such scenario, we need to define some custom css class
    for our Menu Control's Menu item. We can customzie the hyperlink styles (A,
    A:Hover, A:Visited.....) in that custom css class. For example, we define
    the following css class:

    ..MenuLink A
    {
    color: Yellow
    }

    ..MenuLink A:hover
    {
    color:White
    }


    Then, in the asp.net page, we apply this css class to our Menu control's
    Static and Dynamic MenuItems through the following properties:

    <asp:Menu>
    <StaticMenuItemStyle CssClass="MenuLink" />
    <DynamicMenuItemStyle CssClass="MenuLink" />
    </asp:Menu>

    This can help make our Menu control's MenuItems has its own customzed
    hyperlink styles....

    Hope helps. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)




    --------------------
    | From: "Trapulo" <>
    | Subject: 2.0 menu control and color
    | Date: Mon, 5 Dec 2005 22:46:43 +0100
    | Lines: 13
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | Message-ID: <uj79eVe#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31555
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | I've created a menu control, that I use in my master page. I've a problem,
    | because my pages use a css that define a color for "A" tags that is
    | invisible over menu background. So I need that all menu's item have white
    as
    | forecolor, but I cannot make this. I've tried to set to "white" all
    | "forecolor" properties defined for the menu, but I've still links rendered
    | with same color defined in css.
    |
    | How can I force links created by menu control to have a specific color,
    | different from default's one?
    |
    | thanks
    |
    |
    |
    Steven Cheng[MSFT], Dec 6, 2005
    #2
    1. Advertising

  3. Trapulo

    Trapulo Guest

    Hello Steven,
    thank you for your reply. I've tried to work as you suggested, but I've
    still some problem.

    This is my css:
    MenuLink A

    {

    color: White;

    }

    MenuLink A:hover

    {

    color:White;

    }

    A:link {

    text-decoration: none;

    color: #009E40;

    }


    A:visited {

    text-decoration: none;

    color: #009E40;

    }


    A:active {

    text-decoration: none;

    color: #009E40;

    }


    A:hover {

    text-decoration: underline;

    color: #6F6F6F;

    }

    And this is my asp.net menu:

    <asp:Menu ID="Menu1" runat="server" BackColor="#009E40"
    DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="11px"
    ForeColor="White" Orientation="Horizontal"

    StaticSubMenuIndent="10px" EnableViewState="False" Width="100%"
    Style="margin-bottom: 10px;" DynamicVerticalOffset="5"
    StaticEnableDefaultPopOutImage="False" DataSourceID="sourceSite"
    EnableTheming="True" ItemWrap="True">

    <StaticMenuItemStyle CssClass="MenuLink" />

    <DynamicMenuItemStyle CssClass="MenuLink" />

    <DynamicHoverStyle BackColor="#666666" ForeColor="White" />



    <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />

    <DynamicSelectedStyle BackColor="#1C5E55" ForeColor="White" />

    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px"
    BackColor="#009E40" ForeColor="White" BorderStyle="None" Width="100px" />

    <Items>

    <asp:MenuItem Text="Mailing" Value="Mailing">

    <asp:MenuItem NavigateUrl="~/Mailings.aspx" Text="Elenco"
    Value="Elenco"></asp:MenuItem>

    <asp:MenuItem NavigateUrl="~/Mailing.aspx" Text="Nuovo"
    Value="Nuovo"></asp:MenuItem>

    </asp:MenuItem>

    <asp:MenuItem NavigateUrl="~/Default2.aspx" Text="test misti" Value="test
    misti"></asp:MenuItem>

    </Items>

    <StaticHoverStyle BackColor="#666666" ForeColor="White" />

    However, menu links are still rendered with #009E40 color :(

    Here is how html is generated:

    <div style="margin-top: 0px; width: 100%; padding-top: 0px; height: 24px;
    background-color: #349bd6">
    </div>
    <a href="#ctl00_Menu1_SkipLink"><img alt="Skip Navigation Links"
    src="/MassSenderWeb/WebResource.axd?d=8m4TBF3gbZy2FgVmK20EkA2&amp;t=632688759249687500"
    width="0" height="0" style="border-width:0px;" /></a><table id="ctl00_Menu1"
    class="ctl00_Menu1_2" cellpadding="0" cellspacing="0" border="0"
    style="margin-bottom: 10px;">
    <tr>
    <td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
    onkeyup="Menu_Key(event)" id="ctl00_Menu1n0"><table class="MenuLink
    ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
    <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3" href="#"
    style="border-style:none;font-size:1em;cursor:text;">Mailing</a></td>
    </tr>
    </table></td><td style="width:3px;"></td><td
    onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
    onkeyup="Menu_Key(event)" id="ctl00_Menu1n1"><table class="MenuLink
    ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
    <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3"
    href="/MassSenderWeb/default2.aspx"
    style="border-style:none;font-size:1em;">test vari</a></td>
    </tr>
    </table></td>
    </tr>
    </table><div id="ctl00_Menu1n0Items" class="ctl00_Menu1_0">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)"
    onkeyup="Menu_Key(event)" title="Elenco mailing correnti"
    id="ctl00_Menu1n2">
    <td><table class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10" cellpadding="0"
    cellspacing="0" border="0" width="100%">
    <tr>
    <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_5
    ctl00_Menu1_9" href="/MassSenderWeb/mailings.aspx"
    style="border-style:none;font-size:1em;">Elenco</a></td>
    </tr>
    </table></td>
    </tr><tr onmouseover="Menu_HoverDynamic(this)"
    onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(event)"
    id="ctl00_Menu1n3">
    <td><table class="MenuLink ctl00_Menu1_6" cellpadding="0" cellspacing="0"
    border="0" width="100%">
    <tr>
    <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_5"
    href="/MassSenderWeb/mailing.aspx"
    style="border-style:none;font-size:1em;">Nuovo</a></td>
    </tr>
    </table></td>
    </tr>
    </table><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    id="ctl00_Menu1n0ItemsUp" onmouseover="PopOut_Up(this)"
    onmouseout="PopOut_Stop(this)" style="text-align:center;">
    <img
    src="/MassSenderWeb/WebResource.axd?d=9jpB2MUsl7POzORK_OCTq195yG0jQfAm1pfsMgnAOyA1&amp;t=632688759249687500"
    alt="Scroll up" />
    </div><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    id="ctl00_Menu1n0ItemsDn" onmouseover="PopOut_Down(this)"
    onmouseout="PopOut_Stop(this)" style="text-align:center;">
    <img
    src="/MassSenderWeb/WebResource.axd?d=oyB4Qfyn_gPkkRlODDVqjHh8QmXUenoyq-NaXFDiF1o1&amp;t=632688759249687500"
    alt="Scroll down" />
    </div>
    Where is the error?

    thanks



    "Steven Cheng[MSFT]" <> wrote in message
    news:WOlnolj%...
    > As for the css hyperlink style applying problem you met, based on my
    > experience, as for such scenario, we need to define some custom css class
    > for our Menu Control's Menu item. We can customzie the hyperlink styles
    > (A,
    > A:Hover, A:Visited.....) in that custom css class. For example, we define
    > the following css class:
    >
    > MenuLink A
    > {
    > color: Yellow
    > }
    >
    > MenuLink A:hover
    > {
    > color:White
    > }
    >
    >
    > Then, in the asp.net page, we apply this css class to our Menu control's
    > Static and Dynamic MenuItems through the following properties:
    >
    > <asp:Menu>
    > <StaticMenuItemStyle CssClass="MenuLink" />
    > <DynamicMenuItemStyle CssClass="MenuLink" />
    > </asp:Menu>
    >
    > This can help make our Menu control's MenuItems has its own customzed
    > hyperlink styles....
    >
    > Hope helps. Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    >
    > --------------------
    > | From: "Trapulo" <>
    > | Subject: 2.0 menu control and color
    > | Date: Mon, 5 Dec 2005 22:46:43 +0100
    > | Lines: 13
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    > | X-RFC2646: Format=Flowed; Original
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    > | Message-ID: <uj79eVe#>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webcontrols:31555
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > |
    > | I've created a menu control, that I use in my master page. I've a
    > problem,
    > | because my pages use a css that define a color for "A" tags that is
    > | invisible over menu background. So I need that all menu's item have
    > white
    > as
    > | forecolor, but I cannot make this. I've tried to set to "white" all
    > | "forecolor" properties defined for the menu, but I've still links
    > rendered
    > | with same color defined in css.
    > |
    > | How can I force links created by menu control to have a specific color,
    > | different from default's one?
    > |
    > | thanks
    > |
    > |
    > |
    >
    Trapulo, Dec 6, 2005
    #3
  4. Thanks for your response Trapulo,

    From the code you pasted here, I just noticed the below difference from
    your CSS classes and mine:

    Yours:
    ==============
    This is my css:
    MenuLink A
    {
    color: White;
    }

    MenuLink A:hover
    {
    color:White;
    }
    ==============

    Mine:
    =============
    ..MenuLink A
    {
    color: White;
    }

    ..MenuLink A:hover
    {
    color:White;
    }
    ==========

    I'm not sure whether this is a type mistake or .... We need to make sure
    the "." dot is put before the class name since this is the CSS class's
    definition syntax.... (But we don't need to add the dot when we use them in
    page (html ....).

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)


    --------------------
    | From: "Trapulo" <>
    | References: <uj79eVe#>
    <WOlnolj#>
    | Subject: Re: 2.0 menu control and color
    | Date: Tue, 6 Dec 2005 12:15:00 +0100
    | Lines: 258
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <#1uWIZl#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31571
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | Hello Steven,
    | thank you for your reply. I've tried to work as you suggested, but I've
    | still some problem.
    |
    | This is my css:
    | MenuLink A
    |
    | {
    |
    | color: White;
    |
    | }
    |
    | MenuLink A:hover
    |
    | {
    |
    | color:White;
    |
    | }
    |
    | A:link {
    |
    | text-decoration: none;
    |
    | color: #009E40;
    |
    | }
    |
    |
    | A:visited {
    |
    | text-decoration: none;
    |
    | color: #009E40;
    |
    | }
    |
    |
    | A:active {
    |
    | text-decoration: none;
    |
    | color: #009E40;
    |
    | }
    |
    |
    | A:hover {
    |
    | text-decoration: underline;
    |
    | color: #6F6F6F;
    |
    | }
    |
    | And this is my asp.net menu:
    |
    | <asp:Menu ID="Menu1" runat="server" BackColor="#009E40"
    | DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="11px"
    | ForeColor="White" Orientation="Horizontal"
    |
    | StaticSubMenuIndent="10px" EnableViewState="False" Width="100%"
    | Style="margin-bottom: 10px;" DynamicVerticalOffset="5"
    | StaticEnableDefaultPopOutImage="False" DataSourceID="sourceSite"
    | EnableTheming="True" ItemWrap="True">
    |
    | <StaticMenuItemStyle CssClass="MenuLink" />
    |
    | <DynamicMenuItemStyle CssClass="MenuLink" />
    |
    | <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
    |
    |
    |
    | <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    |
    | <DynamicSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    |
    | <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px"
    | BackColor="#009E40" ForeColor="White" BorderStyle="None" Width="100px" />
    |
    | <Items>
    |
    | <asp:MenuItem Text="Mailing" Value="Mailing">
    |
    | <asp:MenuItem NavigateUrl="~/Mailings.aspx" Text="Elenco"
    | Value="Elenco"></asp:MenuItem>
    |
    | <asp:MenuItem NavigateUrl="~/Mailing.aspx" Text="Nuovo"
    | Value="Nuovo"></asp:MenuItem>
    |
    | </asp:MenuItem>
    |
    | <asp:MenuItem NavigateUrl="~/Default2.aspx" Text="test misti" Value="test
    | misti"></asp:MenuItem>
    |
    | </Items>
    |
    | <StaticHoverStyle BackColor="#666666" ForeColor="White" />
    |
    | However, menu links are still rendered with #009E40 color :(
    |
    | Here is how html is generated:
    |
    | <div style="margin-top: 0px; width: 100%; padding-top: 0px; height: 24px;
    | background-color: #349bd6">
    | </div>
    | <a href="#ctl00_Menu1_SkipLink"><img alt="Skip Navigation Links"
    |
    src="/MassSenderWeb/WebResource.axd?d=8m4TBF3gbZy2FgVmK20EkA2&amp;t=63268875
    9249687500"
    | width="0" height="0" style="border-width:0px;" /></a><table
    id="ctl00_Menu1"
    | class="ctl00_Menu1_2" cellpadding="0" cellspacing="0" border="0"
    | style="margin-bottom: 10px;">
    | <tr>
    | <td onmouseover="Menu_HoverStatic(this)"
    onmouseout="Menu_Unhover(this)"
    | onkeyup="Menu_Key(event)" id="ctl00_Menu1n0"><table class="MenuLink
    | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    | <tr>
    | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3" href="#"
    | style="border-style:none;font-size:1em;cursor:text;">Mailing</a></td>
    | </tr>
    | </table></td><td style="width:3px;"></td><td
    | onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
    | onkeyup="Menu_Key(event)" id="ctl00_Menu1n1"><table class="MenuLink
    | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    | <tr>
    | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3"
    | href="/MassSenderWeb/default2.aspx"
    | style="border-style:none;font-size:1em;">test vari</a></td>
    | </tr>
    | </table></td>
    | </tr>
    | </table><div id="ctl00_Menu1n0Items" class="ctl00_Menu1_0">
    | <table border="0" cellpadding="0" cellspacing="0">
    | <tr onmouseover="Menu_HoverDynamic(this)"
    onmouseout="Menu_Unhover(this)"
    | onkeyup="Menu_Key(event)" title="Elenco mailing correnti"
    | id="ctl00_Menu1n2">
    | <td><table class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10"
    cellpadding="0"
    | cellspacing="0" border="0" width="100%">
    | <tr>
    | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    ctl00_Menu1_5
    | ctl00_Menu1_9" href="/MassSenderWeb/mailings.aspx"
    | style="border-style:none;font-size:1em;">Elenco</a></td>
    | </tr>
    | </table></td>
    | </tr><tr onmouseover="Menu_HoverDynamic(this)"
    | onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(event)"
    | id="ctl00_Menu1n3">
    | <td><table class="MenuLink ctl00_Menu1_6" cellpadding="0"
    cellspacing="0"
    | border="0" width="100%">
    | <tr>
    | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    ctl00_Menu1_5"
    | href="/MassSenderWeb/mailing.aspx"
    | style="border-style:none;font-size:1em;">Nuovo</a></td>
    | </tr>
    | </table></td>
    | </tr>
    | </table><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    | id="ctl00_Menu1n0ItemsUp" onmouseover="PopOut_Up(this)"
    | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    | <img
    |
    src="/MassSenderWeb/WebResource.axd?d=9jpB2MUsl7POzORK_OCTq195yG0jQfAm1pfsMg
    nAOyA1&amp;t=632688759249687500"
    | alt="Scroll up" />
    | </div><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    | id="ctl00_Menu1n0ItemsDn" onmouseover="PopOut_Down(this)"
    | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    | <img
    |
    src="/MassSenderWeb/WebResource.axd?d=oyB4Qfyn_gPkkRlODDVqjHh8QmXUenoyq-NaXF
    DiF1o1&amp;t=632688759249687500"
    | alt="Scroll down" />
    | </div>
    | Where is the error?
    |
    | thanks
    |
    |
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:WOlnolj%...
    | > As for the css hyperlink style applying problem you met, based on my
    | > experience, as for such scenario, we need to define some custom css
    class
    | > for our Menu Control's Menu item. We can customzie the hyperlink styles
    | > (A,
    | > A:Hover, A:Visited.....) in that custom css class. For example, we
    define
    | > the following css class:
    | >
    | > MenuLink A
    | > {
    | > color: Yellow
    | > }
    | >
    | > MenuLink A:hover
    | > {
    | > color:White
    | > }
    | >
    | >
    | > Then, in the asp.net page, we apply this css class to our Menu control's
    | > Static and Dynamic MenuItems through the following properties:
    | >
    | > <asp:Menu>
    | > <StaticMenuItemStyle CssClass="MenuLink" />
    | > <DynamicMenuItemStyle CssClass="MenuLink" />
    | > </asp:Menu>
    | >
    | > This can help make our Menu control's MenuItems has its own customzed
    | > hyperlink styles....
    | >
    | > Hope helps. Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | >
    | >
    | >
    | > --------------------
    | > | From: "Trapulo" <>
    | > | Subject: 2.0 menu control and color
    | > | Date: Mon, 5 Dec 2005 22:46:43 +0100
    | > | Lines: 13
    | > | X-Priority: 3
    | > | X-MSMail-Priority: Normal
    | > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | > | X-RFC2646: Format=Flowed; Original
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | > | Message-ID: <uj79eVe#>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webcontrols:31555
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > |
    | > | I've created a menu control, that I use in my master page. I've a
    | > problem,
    | > | because my pages use a css that define a color for "A" tags that is
    | > | invisible over menu background. So I need that all menu's item have
    | > white
    | > as
    | > | forecolor, but I cannot make this. I've tried to set to "white" all
    | > | "forecolor" properties defined for the menu, but I've still links
    | > rendered
    | > | with same color defined in css.
    | > |
    | > | How can I force links created by menu control to have a specific
    color,
    | > | different from default's one?
    | > |
    | > | thanks
    | > |
    | > |
    | > |
    | >
    |
    |
    |
    Steven Cheng[MSFT], Dec 7, 2005
    #4
  5. Trapulo

    Trapulo Guest

    I'm sorry, but I cannot see any "." on the code you posted. Some strange
    newsreader's problem?

    However, based on your description, I added a "." before "MenuLink", and now
    it works. In fact, I needed to overwrite all A "variants" with this code:

    ..MenuLink A

    {

    color: White;

    }

    ..MenuLink A:hover

    {

    color:White;

    }

    ..MenuLink A:link {

    color:White;

    }


    ..MenuLink A:visited {

    color:White;

    }


    ..MenuLink A:active {

    color:White;

    }



    Now it's all ok: thank you for you help!




    "Steven Cheng[MSFT]" <> wrote in message
    news:SFCFKAv%...
    > Thanks for your response Trapulo,
    >
    > From the code you pasted here, I just noticed the below difference from
    > your CSS classes and mine:
    >
    > Yours:
    > ==============
    > This is my css:
    > MenuLink A
    > {
    > color: White;
    > }
    >
    > MenuLink A:hover
    > {
    > color:White;
    > }
    > ==============
    >
    > Mine:
    > =============
    > MenuLink A
    > {
    > color: White;
    > }
    >
    > MenuLink A:hover
    > {
    > color:White;
    > }
    > ==========
    >
    > I'm not sure whether this is a type mistake or .... We need to make sure
    > the "." dot is put before the class name since this is the CSS class's
    > definition syntax.... (But we don't need to add the dot when we use them
    > in
    > page (html ....).
    >
    > Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    > --------------------
    > | From: "Trapulo" <>
    > | References: <uj79eVe#>
    > <WOlnolj#>
    > | Subject: Re: 2.0 menu control and color
    > | Date: Tue, 6 Dec 2005 12:15:00 +0100
    > | Lines: 258
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    > | X-RFC2646: Format=Flowed; Original
    > | Message-ID: <#1uWIZl#>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webcontrols:31571
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > |
    > | Hello Steven,
    > | thank you for your reply. I've tried to work as you suggested, but I've
    > | still some problem.
    > |
    > | This is my css:
    > | MenuLink A
    > |
    > | {
    > |
    > | color: White;
    > |
    > | }
    > |
    > | MenuLink A:hover
    > |
    > | {
    > |
    > | color:White;
    > |
    > | }
    > |
    > | A:link {
    > |
    > | text-decoration: none;
    > |
    > | color: #009E40;
    > |
    > | }
    > |
    > |
    > | A:visited {
    > |
    > | text-decoration: none;
    > |
    > | color: #009E40;
    > |
    > | }
    > |
    > |
    > | A:active {
    > |
    > | text-decoration: none;
    > |
    > | color: #009E40;
    > |
    > | }
    > |
    > |
    > | A:hover {
    > |
    > | text-decoration: underline;
    > |
    > | color: #6F6F6F;
    > |
    > | }
    > |
    > | And this is my asp.net menu:
    > |
    > | <asp:Menu ID="Menu1" runat="server" BackColor="#009E40"
    > | DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="11px"
    > | ForeColor="White" Orientation="Horizontal"
    > |
    > | StaticSubMenuIndent="10px" EnableViewState="False" Width="100%"
    > | Style="margin-bottom: 10px;" DynamicVerticalOffset="5"
    > | StaticEnableDefaultPopOutImage="False" DataSourceID="sourceSite"
    > | EnableTheming="True" ItemWrap="True">
    > |
    > | <StaticMenuItemStyle CssClass="MenuLink" />
    > |
    > | <DynamicMenuItemStyle CssClass="MenuLink" />
    > |
    > | <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
    > |
    > |
    > |
    > | <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    > |
    > | <DynamicSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    > |
    > | <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px"
    > | BackColor="#009E40" ForeColor="White" BorderStyle="None" Width="100px"
    > />
    > |
    > | <Items>
    > |
    > | <asp:MenuItem Text="Mailing" Value="Mailing">
    > |
    > | <asp:MenuItem NavigateUrl="~/Mailings.aspx" Text="Elenco"
    > | Value="Elenco"></asp:MenuItem>
    > |
    > | <asp:MenuItem NavigateUrl="~/Mailing.aspx" Text="Nuovo"
    > | Value="Nuovo"></asp:MenuItem>
    > |
    > | </asp:MenuItem>
    > |
    > | <asp:MenuItem NavigateUrl="~/Default2.aspx" Text="test misti"
    > Value="test
    > | misti"></asp:MenuItem>
    > |
    > | </Items>
    > |
    > | <StaticHoverStyle BackColor="#666666" ForeColor="White" />
    > |
    > | However, menu links are still rendered with #009E40 color :(
    > |
    > | Here is how html is generated:
    > |
    > | <div style="margin-top: 0px; width: 100%; padding-top: 0px; height:
    > 24px;
    > | background-color: #349bd6">
    > | </div>
    > | <a href="#ctl00_Menu1_SkipLink"><img alt="Skip Navigation Links"
    > |
    > src="/MassSenderWeb/WebResource.axd?d=8m4TBF3gbZy2FgVmK20EkA2&amp;t=63268875
    > 9249687500"
    > | width="0" height="0" style="border-width:0px;" /></a><table
    > id="ctl00_Menu1"
    > | class="ctl00_Menu1_2" cellpadding="0" cellspacing="0" border="0"
    > | style="margin-bottom: 10px;">
    > | <tr>
    > | <td onmouseover="Menu_HoverStatic(this)"
    > onmouseout="Menu_Unhover(this)"
    > | onkeyup="Menu_Key(event)" id="ctl00_Menu1n0"><table class="MenuLink
    > | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    > | <tr>
    > | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3" href="#"
    > | style="border-style:none;font-size:1em;cursor:text;">Mailing</a></td>
    > | </tr>
    > | </table></td><td style="width:3px;"></td><td
    > | onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
    > | onkeyup="Menu_Key(event)" id="ctl00_Menu1n1"><table class="MenuLink
    > | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0" width="100%">
    > | <tr>
    > | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3"
    > | href="/MassSenderWeb/default2.aspx"
    > | style="border-style:none;font-size:1em;">test vari</a></td>
    > | </tr>
    > | </table></td>
    > | </tr>
    > | </table><div id="ctl00_Menu1n0Items" class="ctl00_Menu1_0">
    > | <table border="0" cellpadding="0" cellspacing="0">
    > | <tr onmouseover="Menu_HoverDynamic(this)"
    > onmouseout="Menu_Unhover(this)"
    > | onkeyup="Menu_Key(event)" title="Elenco mailing correnti"
    > | id="ctl00_Menu1n2">
    > | <td><table class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10"
    > cellpadding="0"
    > | cellspacing="0" border="0" width="100%">
    > | <tr>
    > | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    > ctl00_Menu1_5
    > | ctl00_Menu1_9" href="/MassSenderWeb/mailings.aspx"
    > | style="border-style:none;font-size:1em;">Elenco</a></td>
    > | </tr>
    > | </table></td>
    > | </tr><tr onmouseover="Menu_HoverDynamic(this)"
    > | onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(event)"
    > | id="ctl00_Menu1n3">
    > | <td><table class="MenuLink ctl00_Menu1_6" cellpadding="0"
    > cellspacing="0"
    > | border="0" width="100%">
    > | <tr>
    > | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    > ctl00_Menu1_5"
    > | href="/MassSenderWeb/mailing.aspx"
    > | style="border-style:none;font-size:1em;">Nuovo</a></td>
    > | </tr>
    > | </table></td>
    > | </tr>
    > | </table><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    > | id="ctl00_Menu1n0ItemsUp" onmouseover="PopOut_Up(this)"
    > | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    > | <img
    > |
    > src="/MassSenderWeb/WebResource.axd?d=9jpB2MUsl7POzORK_OCTq195yG0jQfAm1pfsMg
    > nAOyA1&amp;t=632688759249687500"
    > | alt="Scroll up" />
    > | </div><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    > | id="ctl00_Menu1n0ItemsDn" onmouseover="PopOut_Down(this)"
    > | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    > | <img
    > |
    > src="/MassSenderWeb/WebResource.axd?d=oyB4Qfyn_gPkkRlODDVqjHh8QmXUenoyq-NaXF
    > DiF1o1&amp;t=632688759249687500"
    > | alt="Scroll down" />
    > | </div>
    > | Where is the error?
    > |
    > | thanks
    > |
    > |
    > |
    > | "Steven Cheng[MSFT]" <> wrote in message
    > | news:WOlnolj%...
    > | > As for the css hyperlink style applying problem you met, based on my
    > | > experience, as for such scenario, we need to define some custom css
    > class
    > | > for our Menu Control's Menu item. We can customzie the hyperlink
    > styles
    > | > (A,
    > | > A:Hover, A:Visited.....) in that custom css class. For example, we
    > define
    > | > the following css class:
    > | >
    > | > MenuLink A
    > | > {
    > | > color: Yellow
    > | > }
    > | >
    > | > MenuLink A:hover
    > | > {
    > | > color:White
    > | > }
    > | >
    > | >
    > | > Then, in the asp.net page, we apply this css class to our Menu
    > control's
    > | > Static and Dynamic MenuItems through the following properties:
    > | >
    > | > <asp:Menu>
    > | > <StaticMenuItemStyle CssClass="MenuLink" />
    > | > <DynamicMenuItemStyle CssClass="MenuLink" />
    > | > </asp:Menu>
    > | >
    > | > This can help make our Menu control's MenuItems has its own customzed
    > | > hyperlink styles....
    > | >
    > | > Hope helps. Thanks,
    > | >
    > | > Steven Cheng
    > | > Microsoft Online Support
    > | >
    > | > Get Secure! www.microsoft.com/security
    > | > (This posting is provided "AS IS", with no warranties, and confers no
    > | > rights.)
    > | >
    > | >
    > | >
    > | >
    > | > --------------------
    > | > | From: "Trapulo" <>
    > | > | Subject: 2.0 menu control and color
    > | > | Date: Mon, 5 Dec 2005 22:46:43 +0100
    > | > | Lines: 13
    > | > | X-Priority: 3
    > | > | X-MSMail-Priority: Normal
    > | > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    > | > | X-RFC2646: Format=Flowed; Original
    > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    > | > | Message-ID: <uj79eVe#>
    > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    > | > | Path:
    > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    > | > | Xref: TK2MSFTNGXA02.phx.gbl
    > | > microsoft.public.dotnet.framework.aspnet.webcontrols:31555
    > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | > |
    > | > | I've created a menu control, that I use in my master page. I've a
    > | > problem,
    > | > | because my pages use a css that define a color for "A" tags that is
    > | > | invisible over menu background. So I need that all menu's item have
    > | > white
    > | > as
    > | > | forecolor, but I cannot make this. I've tried to set to "white" all
    > | > | "forecolor" properties defined for the menu, but I've still links
    > | > rendered
    > | > | with same color defined in css.
    > | > |
    > | > | How can I force links created by menu control to have a specific
    > color,
    > | > | different from default's one?
    > | > |
    > | > | thanks
    > | > |
    > | > |
    > | > |
    > | >
    > |
    > |
    > |
    >
    Trapulo, Dec 7, 2005
    #5
  6. You're welcome Trapulo,

    Glad that it works for you.
    Have a nice day!

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | From: "Trapulo" <>
    | References: <uj79eVe#>
    <WOlnolj#>
    <#1uWIZl#>
    <SFCFKAv#>
    | Subject: Re: 2.0 menu control and color
    | Date: Wed, 7 Dec 2005 23:10:51 +0100
    | Lines: 403
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <O7hRQs3#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: host229-15.pool8248.interbusiness.it 82.48.15.229
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31618
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | I'm sorry, but I cannot see any "." on the code you posted. Some strange
    | newsreader's problem?
    |
    | However, based on your description, I added a "." before "MenuLink", and
    now
    | it works. In fact, I needed to overwrite all A "variants" with this code:
    |
    | .MenuLink A
    |
    | {
    |
    | color: White;
    |
    | }
    |
    | .MenuLink A:hover
    |
    | {
    |
    | color:White;
    |
    | }
    |
    | .MenuLink A:link {
    |
    | color:White;
    |
    | }
    |
    |
    | .MenuLink A:visited {
    |
    | color:White;
    |
    | }
    |
    |
    | .MenuLink A:active {
    |
    | color:White;
    |
    | }
    |
    |
    |
    | Now it's all ok: thank you for you help!
    |
    |
    |
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:SFCFKAv%...
    | > Thanks for your response Trapulo,
    | >
    | > From the code you pasted here, I just noticed the below difference from
    | > your CSS classes and mine:
    | >
    | > Yours:
    | > ==============
    | > This is my css:
    | > MenuLink A
    | > {
    | > color: White;
    | > }
    | >
    | > MenuLink A:hover
    | > {
    | > color:White;
    | > }
    | > ==============
    | >
    | > Mine:
    | > =============
    | > MenuLink A
    | > {
    | > color: White;
    | > }
    | >
    | > MenuLink A:hover
    | > {
    | > color:White;
    | > }
    | > ==========
    | >
    | > I'm not sure whether this is a type mistake or .... We need to make
    sure
    | > the "." dot is put before the class name since this is the CSS class's
    | > definition syntax.... (But we don't need to add the dot when we use
    them
    | > in
    | > page (html ....).
    | >
    | > Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | >
    | > --------------------
    | > | From: "Trapulo" <>
    | > | References: <uj79eVe#>
    | > <WOlnolj#>
    | > | Subject: Re: 2.0 menu control and color
    | > | Date: Tue, 6 Dec 2005 12:15:00 +0100
    | > | Lines: 258
    | > | X-Priority: 3
    | > | X-MSMail-Priority: Normal
    | > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | > | X-RFC2646: Format=Flowed; Original
    | > | Message-ID: <#1uWIZl#>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webcontrols:31571
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > |
    | > | Hello Steven,
    | > | thank you for your reply. I've tried to work as you suggested, but
    I've
    | > | still some problem.
    | > |
    | > | This is my css:
    | > | MenuLink A
    | > |
    | > | {
    | > |
    | > | color: White;
    | > |
    | > | }
    | > |
    | > | MenuLink A:hover
    | > |
    | > | {
    | > |
    | > | color:White;
    | > |
    | > | }
    | > |
    | > | A:link {
    | > |
    | > | text-decoration: none;
    | > |
    | > | color: #009E40;
    | > |
    | > | }
    | > |
    | > |
    | > | A:visited {
    | > |
    | > | text-decoration: none;
    | > |
    | > | color: #009E40;
    | > |
    | > | }
    | > |
    | > |
    | > | A:active {
    | > |
    | > | text-decoration: none;
    | > |
    | > | color: #009E40;
    | > |
    | > | }
    | > |
    | > |
    | > | A:hover {
    | > |
    | > | text-decoration: underline;
    | > |
    | > | color: #6F6F6F;
    | > |
    | > | }
    | > |
    | > | And this is my asp.net menu:
    | > |
    | > | <asp:Menu ID="Menu1" runat="server" BackColor="#009E40"
    | > | DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="11px"
    | > | ForeColor="White" Orientation="Horizontal"
    | > |
    | > | StaticSubMenuIndent="10px" EnableViewState="False" Width="100%"
    | > | Style="margin-bottom: 10px;" DynamicVerticalOffset="5"
    | > | StaticEnableDefaultPopOutImage="False" DataSourceID="sourceSite"
    | > | EnableTheming="True" ItemWrap="True">
    | > |
    | > | <StaticMenuItemStyle CssClass="MenuLink" />
    | > |
    | > | <DynamicMenuItemStyle CssClass="MenuLink" />
    | > |
    | > | <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
    | > |
    | > |
    | > |
    | > | <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    | > |
    | > | <DynamicSelectedStyle BackColor="#1C5E55" ForeColor="White" />
    | > |
    | > | <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px"
    | > | BackColor="#009E40" ForeColor="White" BorderStyle="None"
    Width="100px"
    | > />
    | > |
    | > | <Items>
    | > |
    | > | <asp:MenuItem Text="Mailing" Value="Mailing">
    | > |
    | > | <asp:MenuItem NavigateUrl="~/Mailings.aspx" Text="Elenco"
    | > | Value="Elenco"></asp:MenuItem>
    | > |
    | > | <asp:MenuItem NavigateUrl="~/Mailing.aspx" Text="Nuovo"
    | > | Value="Nuovo"></asp:MenuItem>
    | > |
    | > | </asp:MenuItem>
    | > |
    | > | <asp:MenuItem NavigateUrl="~/Default2.aspx" Text="test misti"
    | > Value="test
    | > | misti"></asp:MenuItem>
    | > |
    | > | </Items>
    | > |
    | > | <StaticHoverStyle BackColor="#666666" ForeColor="White" />
    | > |
    | > | However, menu links are still rendered with #009E40 color :(
    | > |
    | > | Here is how html is generated:
    | > |
    | > | <div style="margin-top: 0px; width: 100%; padding-top: 0px; height:
    | > 24px;
    | > | background-color: #349bd6">
    | > | </div>
    | > | <a href="#ctl00_Menu1_SkipLink"><img alt="Skip Navigation
    Links"
    | > |
    | >
    src="/MassSenderWeb/WebResource.axd?d=8m4TBF3gbZy2FgVmK20EkA2&amp;t=63268875
    | > 9249687500"
    | > | width="0" height="0" style="border-width:0px;" /></a><table
    | > id="ctl00_Menu1"
    | > | class="ctl00_Menu1_2" cellpadding="0" cellspacing="0" border="0"
    | > | style="margin-bottom: 10px;">
    | > | <tr>
    | > | <td onmouseover="Menu_HoverStatic(this)"
    | > onmouseout="Menu_Unhover(this)"
    | > | onkeyup="Menu_Key(event)" id="ctl00_Menu1n0"><table class="MenuLink
    | > | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0"
    width="100%">
    | > | <tr>
    | > | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3" href="#"
    | > | style="border-style:none;font-size:1em;cursor:text;">Mailing</a></td>
    | > | </tr>
    | > | </table></td><td style="width:3px;"></td><td
    | > | onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
    | > | onkeyup="Menu_Key(event)" id="ctl00_Menu1n1"><table class="MenuLink
    | > | ctl00_Menu1_4" cellpadding="0" cellspacing="0" border="0"
    width="100%">
    | > | <tr>
    | > | <td><a class="ctl00_Menu1_1 MenuLink ctl00_Menu1_3"
    | > | href="/MassSenderWeb/default2.aspx"
    | > | style="border-style:none;font-size:1em;">test vari</a></td>
    | > | </tr>
    | > | </table></td>
    | > | </tr>
    | > | </table><div id="ctl00_Menu1n0Items" class="ctl00_Menu1_0">
    | > | <table border="0" cellpadding="0" cellspacing="0">
    | > | <tr onmouseover="Menu_HoverDynamic(this)"
    | > onmouseout="Menu_Unhover(this)"
    | > | onkeyup="Menu_Key(event)" title="Elenco mailing correnti"
    | > | id="ctl00_Menu1n2">
    | > | <td><table class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10"
    | > cellpadding="0"
    | > | cellspacing="0" border="0" width="100%">
    | > | <tr>
    | > | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    | > ctl00_Menu1_5
    | > | ctl00_Menu1_9" href="/MassSenderWeb/mailings.aspx"
    | > | style="border-style:none;font-size:1em;">Elenco</a></td>
    | > | </tr>
    | > | </table></td>
    | > | </tr><tr onmouseover="Menu_HoverDynamic(this)"
    | > | onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(event)"
    | > | id="ctl00_Menu1n3">
    | > | <td><table class="MenuLink ctl00_Menu1_6" cellpadding="0"
    | > cellspacing="0"
    | > | border="0" width="100%">
    | > | <tr>
    | > | <td style="width:100%;"><a class="ctl00_Menu1_1 MenuLink
    | > ctl00_Menu1_5"
    | > | href="/MassSenderWeb/mailing.aspx"
    | > | style="border-style:none;font-size:1em;">Nuovo</a></td>
    | > | </tr>
    | > | </table></td>
    | > | </tr>
    | > | </table><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10
    ctl00_Menu1_0"
    | > | id="ctl00_Menu1n0ItemsUp" onmouseover="PopOut_Up(this)"
    | > | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    | > | <img
    | > |
    | >
    src="/MassSenderWeb/WebResource.axd?d=9jpB2MUsl7POzORK_OCTq195yG0jQfAm1pfsMg
    | > nAOyA1&amp;t=632688759249687500"
    | > | alt="Scroll up" />
    | > | </div><div class="MenuLink ctl00_Menu1_6 ctl00_Menu1_10 ctl00_Menu1_0"
    | > | id="ctl00_Menu1n0ItemsDn" onmouseover="PopOut_Down(this)"
    | > | onmouseout="PopOut_Stop(this)" style="text-align:center;">
    | > | <img
    | > |
    | >
    src="/MassSenderWeb/WebResource.axd?d=oyB4Qfyn_gPkkRlODDVqjHh8QmXUenoyq-NaXF
    | > DiF1o1&amp;t=632688759249687500"
    | > | alt="Scroll down" />
    | > | </div>
    | > | Where is the error?
    | > |
    | > | thanks
    | > |
    | > |
    | > |
    | > | "Steven Cheng[MSFT]" <> wrote in message
    | > | news:WOlnolj%...
    | > | > As for the css hyperlink style applying problem you met, based on my
    | > | > experience, as for such scenario, we need to define some custom css
    | > class
    | > | > for our Menu Control's Menu item. We can customzie the hyperlink
    | > styles
    | > | > (A,
    | > | > A:Hover, A:Visited.....) in that custom css class. For example, we
    | > define
    | > | > the following css class:
    | > | >
    | > | > MenuLink A
    | > | > {
    | > | > color: Yellow
    | > | > }
    | > | >
    | > | > MenuLink A:hover
    | > | > {
    | > | > color:White
    | > | > }
    | > | >
    | > | >
    | > | > Then, in the asp.net page, we apply this css class to our Menu
    | > control's
    | > | > Static and Dynamic MenuItems through the following properties:
    | > | >
    | > | > <asp:Menu>
    | > | > <StaticMenuItemStyle CssClass="MenuLink" />
    | > | > <DynamicMenuItemStyle CssClass="MenuLink" />
    | > | > </asp:Menu>
    | > | >
    | > | > This can help make our Menu control's MenuItems has its own
    customzed
    | > | > hyperlink styles....
    | > | >
    | > | > Hope helps. Thanks,
    | > | >
    | > | > Steven Cheng
    | > | > Microsoft Online Support
    | > | >
    | > | > Get Secure! www.microsoft.com/security
    | > | > (This posting is provided "AS IS", with no warranties, and confers
    no
    | > | > rights.)
    | > | >
    | > | >
    | > | >
    | > | >
    | > | > --------------------
    | > | > | From: "Trapulo" <>
    | > | > | Subject: 2.0 menu control and color
    | > | > | Date: Mon, 5 Dec 2005 22:46:43 +0100
    | > | > | Lines: 13
    | > | > | X-Priority: 3
    | > | > | X-MSMail-Priority: Normal
    | > | > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    | > | > | X-RFC2646: Format=Flowed; Original
    | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    | > | > | Message-ID: <uj79eVe#>
    | > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | > | NNTP-Posting-Host: host59-15.pool8252.interbusiness.it 82.52.15.59
    | > | > | Path:
    | > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | > | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > | > microsoft.public.dotnet.framework.aspnet.webcontrols:31555
    | > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | > |
    | > | > | I've created a menu control, that I use in my master page. I've a
    | > | > problem,
    | > | > | because my pages use a css that define a color for "A" tags that
    is
    | > | > | invisible over menu background. So I need that all menu's item
    have
    | > | > white
    | > | > as
    | > | > | forecolor, but I cannot make this. I've tried to set to "white"
    all
    | > | > | "forecolor" properties defined for the menu, but I've still links
    | > | > rendered
    | > | > | with same color defined in css.
    | > | > |
    | > | > | How can I force links created by menu control to have a specific
    | > color,
    | > | > | different from default's one?
    | > | > |
    | > | > | thanks
    | > | > |
    | > | > |
    | > | > |
    | > | >
    | > |
    | > |
    | > |
    | >
    |
    |
    |
    Steven Cheng[MSFT], Dec 8, 2005
    #6
  7. Hi All,

    I have a problem which is probably close to this. I need to create a
    menu with transparent items so that dynamic submenu appear transparent.
    In DynamicMenuItemStyle, DynamicMenuStyle and DynamicHoverStyle I put
    both ForeColor and BackColor to transparent. It doesn't help.

    Does someone know how to do this?

    Thanks,
    Artem

    Trapulo wrote:

    > I've created a menu control, that I use in my master page. I've a problem,
    > because my pages use a css that define a color for "A" tags that is
    > invisible over menu background. So I need that all menu's item have white as
    > forecolor, but I cannot make this. I've tried to set to "white" all
    > "forecolor" properties defined for the menu, but I've still links rendered
    > with same color defined in css.
    >
    > How can I force links created by menu control to have a specific color,
    > different from default's one?
    >
    > thanks
    >
    >
    Artem Kliatchkine, Dec 8, 2005
    #7
  8. Trapulo

    Trapulo Guest

    I think you can use Steven's suggest, and set bg color to transparent in
    your css. Does it works?


    "Artem Kliatchkine" <> wrote in message
    news:uZYL5F%23%...
    > Hi All,
    >
    > I have a problem which is probably close to this. I need to create a
    > menu with transparent items so that dynamic submenu appear transparent.
    > In DynamicMenuItemStyle, DynamicMenuStyle and DynamicHoverStyle I put
    > both ForeColor and BackColor to transparent. It doesn't help.
    >
    > Does someone know how to do this?
    >
    > Thanks,
    > Artem
    > >>

    >
    Trapulo, Dec 8, 2005
    #8
  9. Trapulo wrote:

    > I think you can use Steven's suggest, and set bg color to transparent in
    > your css. Does it works?


    No :-(
    I applied a css class with background color set to transparent but it
    looks just white space while I should see a site content through it. The
    class was applied because text color changed but it doesn't make menu
    items transparent.

    I'm new in web programming, maybe I just don't understand something.

    >
    > "Artem Kliatchkine" <> wrote in message
    > news:uZYL5F%23%...
    > > Hi All,
    > >
    > > I have a problem which is probably close to this. I need to create a
    > > menu with transparent items so that dynamic submenu appear transparent.
    > > In DynamicMenuItemStyle, DynamicMenuStyle and DynamicHoverStyle I put
    > > both ForeColor and BackColor to transparent. It doesn't help.
    > >
    > > Does someone know how to do this?
    > >
    > > Thanks,
    > > Artem
    > > >>

    > >

    >
    >
    Artem Kliatchkine, Dec 13, 2005
    #9
    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. Replies:
    0
    Views:
    397
  2. Brendon

    Color property returns Color.Empty to my control

    Brendon, Mar 23, 2005, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    159
    Jason Bentley
    Mar 24, 2005
  3. Trapulo

    2.0 menu control and color

    Trapulo, Dec 5, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    94
    Trapulo
    Dec 5, 2005
  4. Menu control and hover text color

    , Jul 10, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    323
    Alessandro Zifiglio
    Jul 12, 2006
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    364
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page