setminHeightHeader resizing bug
-
I’ve done my best to find a previous post about this but no luck.
I’m using a child theme of Zerif Lite and have come across a window resizing bug.
I’ve created a gif to illustrate the bug:
BUGI tracked the issue back to the zerif.js function setminHeightHeader():
function setminHeightHeader() { jQuery('#main-nav').css('min-height','75px'); jQuery('.header').css('min-height','75px'); var minHeight = parseInt( jQuery('#main-nav').height() ); jQuery('#main-nav').css('min-height',minHeight); jQuery('.header').css('min-height',minHeight); }
I solved my issue by commenting out the last three lines:
function setminHeightHeader() { jQuery('#main-nav').css('min-height','75px'); jQuery('.header').css('min-height','75px'); // var minHeight = parseInt( jQuery('#main-nav').height() ); // jQuery('#main-nav').css('min-height',minHeight); // jQuery('.header').css('min-height',minHeight); }
And here’s a gif illustrating the fix:
FIXI’m unsure why setminHeightHeader sets the height of #main-nav and .header twice. As far as I can see it sets min-height to 75, stores 75 in minHeight, then sets min-height again (to 75).
Moreover this doesn’t explain why my header was resizing. I’m guessing something to do with the size of the responsive logo?thanks, jhwd.
- The topic ‘setminHeightHeader resizing bug’ is closed to new replies.