Website Menu Bar Drop Down

前端 未结 3 1022
逝去的感伤
逝去的感伤 2020-12-20 04:58

I am working on a website for a client. For the menu/navigation bar, I created one for them (they were very specific) with dropdowns, but there is one problem--when you mous

3条回答
  •  醉梦人生
    2020-12-20 05:34

    Problem #1: Menu disappears before cursor can reach submenu.

    Usually this is due to a gap between the

  • tag and the subnavigation
      . A gap of even one pixel will cause the navigation to disappear before the cursor can reach the submenu.

      For instance, add a padding: 0 0 10px; to .nav li in your CSS, and the problem goes away.

      You could also set a specific height for the

    • to cover the problem, too.

      Problem #2: Menu disappears when cursor runs over the image slideshow.

      As to the problem of your menu disappearing when you reach the point where your image slideshow and menu collide, that's due to a z-index problem.

      You should set the .nav to have a z-index: 200 (or anything greater than 100, according to your slideshow -- I try to go overboard). This will make sure it sits above the gallery.

提交回复
热议问题