toggle not working for resize

馋奶兔 提交于 2020-01-16 03:27:19

问题


when i resize the browser the nav having home profile etc should disappear and MENU would pop up. on clicking it CLOSE MENU would come with the nav below but the background of close menu expanda height wise instead of being as it is..also after the toggle the menu goes behind the content and hover doesnt work

my html is as follows

<nav class="nav">
    <input type="checkbox" id="toggle" />
      <label for="toggle" class="toggle" data-open="MENU" data-close="Close Menu" onclick></label>
        <ul class="menu">
        <li><a href="#">HOME</a></li>
        <li class="parent"><a href="#">PROFILE</a>
            <ul class="children submenu0">
                <li><a href="#">SIZE</a>

                 </li>
                 <li class="parent"><a href="#">NATURE</a>
                 <ul class="children submenu1">
                        <li><a href="#">SMALL</a></li>
                        <li><a href="#">MEDIUM</a></li>
                    </ul>
                 </li>
            </ul>
          </li>
        <li><a href="#">CONTACT</a></li>
      </ul>                 
  </nav>

...i have solved on my own ...thank to all who responded


回答1:


Replacing all .ul in your CSS with ul will solve your problem.



来源:https://stackoverflow.com/questions/22575480/toggle-not-working-for-resize

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!