Create a header that shows anywhere on the page on hamburger icon click !

No extra plug-ins required! Elementor Pro Required.

In this article, I will explain how to create a header that is not visible when scrolling down, but that can be shown at any location in the page by clicking on the hamburger icon.

To begin with, create your menu in a new section

It can be in the header template, or in a single page.

Then, give that section a CSS ID of ' menuhopin ' and a Z-Index of 199

Display Header Anywhere On The Page On Icon Click

Make that section sticky at the top

Elementor Sticky Header Changes Logo Size and Position

Now, create a new section, give that section a z-index of 999 and set the columns gap to no gap

This is the section that will house the hamburger menu. Don’t worry about positioning, the CSS will place it right.

Display Header Anywhere On The Page On Icon Click
Display Header Anywhere On The Page On Icon Click

Download the hamburger menu icons here

Choose your preferred one, and place all of its html in an html element in the section created above

Elementor Close PopUp on Click for Menu & Same Page Links
the one on the left

See this article for the examples to choose your preferred icon.

Finally, simply add all of this code in another html element, created below the one that has the hamburger icon

<script> 
/* Please login to get the code 
 * The code will be for the Display Header Anywhere On The Page On Icon Click tutorial 
 * Found at this URL https://element.how/show-header-hamburger-click/ 
 */ 
</script>

This will also work for sections that are not at the top of the page. Simply adjust the (y > 46) value in the code to the right height.

Et voila! Thanks for reading!
Let me know if you need help!

Leave a Reply