Need CSS code for my menu

  • Unknown's avatar

    Hello everyone!

    I have a css code for my website that makes some of the panels disappear in the main menu at the top of my website. Code:
    #primary-menu li:nth-child(4), #primary-menu li:nth-child(6), #primary-menu li:nth-child(2) { display: none; }

    This code however covers all menu’s so the one at the bottom of my website falls under the same code when I open those pages like here: https://dbsdesigns.nl/een-vraag-aan-ons/ it only shows 3 out of 5. Is there a way I can put in a code that tells Menu2 to show everything while my main menu still has the original condition?
    Thank you!!

    The blog I need help with is: (visible only to logged in users)

  • Hello

    When I look at your page at https://dbsdesigns.nl/een-vraag-aan-ons/, I see three menu items in the blue bar at the top and 5 menu items in the footer at the bottom.

    It looks like it’s working as you intended.

    Is the correct? Or are you looking to have the menu at the top of dbsdesigns.nl also match the menu at the top of https://dbsdesigns.nl/een-vraag-aan-ons/?

  • Unknown's avatar

    Hello!

    Well, if you open up https://dbsdesigns.nl/een-vraag-aan-ons/ you get a different menu, this menu is actually the same as the one in the bottom. (which is what I want). But due to the condition I gave the main menu on DBS Designs (with Diensten, Ontwerp, Drukwerk etc.) it keeps two out of the 5 hidden. So I need a code that only applies to my main blue menu and not to the second one with (Wie zijn wij?, Een vraag aan ons? etc.)

    I created this code because I don’t want the main menu to show the words, panel 2 panel 4 and panel 6. But now it seems the code also works on the second menu. If you get me.

    Thank you!

  • Unknown's avatar

    @dean22, in the opening body HTML tag on your home page, you will see a generated CSS class of “home”. We can use that to limit your menu CSS to only the home page like this.

    .home #primary-menu li:nth-child(4), .home #primary-menu li:nth-child(6), .home #primary-menu li:nth-child(2) {
    	display:none
    }
  • The topic ‘Need CSS code for my menu’ is closed to new replies.