Menu Control - Selected Item Style - Background image showing twice

Discussion in 'ASP .Net Web Controls' started by IntraRELY, Jun 9, 2007.

  1. IntraRELY

    IntraRELY Guest

    The problem I have having is that the Selected Menu Item when displayed in the brower shows greenarrow.gif twice. Once for the Text of the Menu Item (as the background image) and another for the Menu Item itself. I believe this is how it is being rendered and that somehow the CSS class is being applies once for the actual text or the object which contains it and another for the menu item. I have no other places where this file is specified. Not sure how to fix this here.

    Any help appreciated. Here is my code:

    SiteMap
    ASP Code
    CSS Classes used

    TIA,

    Steve


    I have a menu that is filled from the web.sitemap datasource as follows:
    <?xml version="1.0" encoding="utf-8" ?>

    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

    <siteMapNode>

    <siteMapNode url="AboutGreenbridge.aspx" title="About Greenbridge" description="" />

    <siteMapNode url="DebtProducts.aspx" title="Debt Products" description="" />

    <siteMapNode url="InvestmentCriteria.aspx" title="Investment Criteria" description="" />

    <siteMapNode url="SelectedTransactions.aspx" title="Selected Transactions" description="" />

    <siteMapNode url="ValueProposition.aspx" title="Value Proposition" description="" />

    <siteMapNode url="OurTeam.aspx" title="Our Team" description="" />

    <siteMapNode url="Contact.aspx" title="Contact" description="" />

    <siteMapNode url="Default.aspx" title="Home" description="" />

    </siteMapNode>

    </siteMap>


    Here is my ASP code located in the MasterPage.Master:

    <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" >

    <StaticMenuStyle CssClass="menuStyle" />

    <StaticMenuItemStyle CssClass="menuStyleItem" />

    <StaticSelectedStyle CssClass="menuStyleSelected" />

    </asp:Menu>

    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />





    I have the following CSS Classes:

    ..menuStyle

    {

    font-family: tahoma,Verdana, Geneva, Arial, Helvetica, sans-serif;

    font-size: 11px;

    text-decoration:none;

    font-weight:normal;

    color:#4d4d4d;

    display:block;

    padding-left:20;

    padding-right:10;

    width:214px;

    }

    ..menuStyleItem

    {

    border-bottom:solid 1px #ececec;

    padding:3;


    }

    ..menuStyleSelected

    {

    background-color:#f0f0f0;

    background-image:url(sitegraphics/greenarrow.gif);

    background-repeat:no-repeat;

    background-position:right center;

    }
     
    IntraRELY, Jun 9, 2007
    #1
    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. Eirik Eldorsen
    Replies:
    0
    Views:
    3,345
    Eirik Eldorsen
    Jul 28, 2006
  2. Wayne Erfling
    Replies:
    0
    Views:
    469
    Wayne Erfling
    Oct 13, 2006
  3. Replies:
    0
    Views:
    1,481
  4. RJN
    Replies:
    0
    Views:
    2,131
  5. Replies:
    0
    Views:
    313
Loading...

Share This Page