css - Jquery hiding responsive navigation when increasing browser size -
i have nav bar hides when window goes below width. menu button appears. when button toggled show menu , toggled hide again , window size increased navbar stays hidden. think jquery toggle adding inline style overriding css
how can stop happening?
$('#responsive_nav_trigger').click(function(){ $('#top_nav').toggle('fast'); }); @media screen , (min-width: 760px) { #top_nav{ display: inline-block; } } @media screen , (max-width: 760px) { #responsive_nav_trigger{ display: block; } #top_nav{ display: none; float: left; width: 100%; clear: both; } #top_nav li{ width: 100%; height: 25px; font-size: 1em; float: left; margin: 5px 0; padding: 0; text-align: center; } }
please use
display: inline-block!important;
Comments
Post a Comment