问题描述:

i build a single page with responsiveness for mobile devices.

i am using a fixed position for the menü. Theres is a Menu-Button which displays an sub after "touching" it. this works perfect. BUT after using a menu-item i have to scroll the page first before i can click the Menu-Button again.

any ideas why is that?

this on is for the toggleling of the sub-menu-div:

<script>

$('#navmobile').click(function(){

$('.submenu').toggle();

});

</script>

and this one if the submenu:

<ul id="navmobile">

<li><a href="">MENÜ</a></li>

<ul class="submenu">

<li class="current"><a href="#section-1">Einleitung</a></li>

<li><a href="#section-2">Menüpunkt1</a></li>

<li><a href="#section-3">Menüpunkt2</a></li>

<li><a href="#section-4">Menüpunkt3</a></li>

<li><a href="#section-5">Menüpunkt4</a></li>

</ul>

</ul>

and the css:

#navmobile {display: block !important; z-index: 100000}

#navmobile li {float: left; list-style: none; margin: 0 18px 0 0; font-size: 26px; text-transform: uppercase; font-weight: bold; -moz-margin-end: 26px}

#navmobile li a {text-decoration: none;padding: 2px 4px;}

#navmobile li.current a, li:hover a{color: #fff; background: #2b9ad0}

#navmobile .submenu {display: none}

#navmobile .submenu {width: 300px; position: absolute; left:-130px; top: 35px; background: #efefef; padding: 5px; border: 2px solid #ddd;border-radius: 1px}

#navmobile .submenu li a{font-size: 30px; text-align: right; line-height: 60px}

and the css for the container around the nav:

 .navigation {width: 200px !important;height: 20px;position: fixed;top: 45px;left: 400px}

网友答案:

got it myself. it was the height of the

  • Menü
  • . you have do define a larger height than normal.

    相关阅读:
    Top