jquery - ASP.NET MVC page, CSS (?) problem -


I have an asp.net mvc site (master page + content page). On the master page, I have a menu when some options are selected on the menu, it brings you to the appropriate controller and shows the page, which is fine, but it also shows a submenu Submenu looks ok, but it The issue is in the menu. I'm unable to work the menu CSS for me.

Here is the menu code:

  & lt; Ul id = "menuDeveloper" & gt; & Lt; Li & gt; & Lt;% = Html.ActionLink ("Home", "Index", "Home", New {domain = (empty), empty)% & gt; & Lt; / Li & gt; & Lt; Li id = 'idcardselect' & gt; & Lt;% = Html Keywords ("idcard", "index", "select idcard", new {domain = "idcard_satch"}, empty)% & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt;% = Html.exeLink ("Group", "Index", "Group Setup", New {domain = "GroupSet"}, empty)% & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

Here is the CSS that goes with it:

  ul # menuDeveloper {font-family: Arial, Helvetica, sans-serif; Font-size: 93%; float right; Background: url ("images / bg-menu.gif") No-Repeat 50% -9px; Margin-right: 22px; Margin-top: 6px; Height: 46px; Width: 541px; } Ul # menuDeveloper li {float: left; Margin-left: 20px; Margin-top: 10px; } Ul # menuDeveloper li a {color: # 6192c1; Padding: 10px 2px 15px 2px; Text-decoration: None; Text-transform: uppercase; Height: 46px; } Ul # menuDeveloper li a.active {background: # e0e0e0; Color: # 1f67a7; } Ul # menuDeveloper li a: hover {background: # e0e0e0; Color: # 1f67a7; } Ul # menuDeveloper li.menuidcardactive {background: # e0e0e0; Color: # 1f67a7; }  

All CSS works perfectly, skip the last part (.memardcards class). The way I am implementing this may be, what happens

  • Elements do not get the style, but get a share of the element (only the background part, 'color' does not change). I have tried several ways to change the class. I just want the
  • "submenu" being displayed, the menu is "connected" and the user understands how the submenu is for it.

    Here's a sample of what I have tried

  • :

      $ ("# idcardselect") to change the class. Ether ('square', 'menu cardcard'); $ ("# Idcardselect") addClass ('menuidcardactive') $ ("# Idcardselect") removeClass () addClass ('menuidcardactive') ..  

    All of this was done inside $ (window). Load (function () {});

    Any ideas / solutions will be appreciated.

    Thank you!

  • I think the problem is in your CSS. Try adding 'A' at the end of the last item so that you apply the style to the anchor and not take it.

      ul # menuDeveloper li.menuidcardactive a   

      ul # menuDeveloper li.menuidcardactive  

    Instead of

    so your background is applied) but the color of the text

      ul Overriding by # menuDeveloper li a  

    Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -