html - CSS responsives, close menu automatically -
i new css, working on responsive page. have menu bar on left side of screen, can retracted on click on button, want make once screen size reaches size, menu retract automatically without user having click on button.
<a href="#" class="menu-toggle icon" id="left-menu-toggle" title="menu"> <i class="fa fa-bars"></i> </a>
this menu button.
you hide menu using media query , display none.
you can adjust max-width based on size of device want menu hide on. styles applied devices size of 480px or smaller.
something this
@media screen , (max-width: 480px) { #left-menu-toggle { display:none; } }
additionally use min-width:481px
, have menu display:block
on larger screens. know mobile first because you're targeting css towards mobile devices , changing things larger devices.
Comments
Post a Comment