I am having issues with a bug in a project I am working on.
The mobile menu which I want to take the full height of the viewport when it is less than 768px doesn't have a height even though I set it to 100%.
It will only be in view when toggled using the hamburger icon.
The nav
element is absolutely positioned and the mobile menu is the last child element of the nav
element.
The nav
element is absolutely positioned so that the background is transparent and the section
below it can be at the top of the page.
I want the div
with class mobile_links
to take up the full height of the page when toggled on mobile devices.
I have got a workaround to it which is to set the position
property of the section
below the nav
to relative
and set top: -40px
.
I will have to set the position
property of the nav
element to static
as well for this to work.
However, I don't like this because it leaves a space between the two section
elements on the page.
Is there a way I can get the mobile menu to have 100% height without having to change the position
properties that I have at the moment?
Here is the link to the page I am talking about: https://carifood-init.appspot.com/