Hi @amcd125 - I achieved this using the following code here:
w3 schools
You would have to add the code into the custom css + html sections of lay theme settings:
UNDER CUSTOM HTML:
<div id="myNav" class="overlay">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<div class="overlay-content">
<a href="/myfirstlink">link 1</a>
<a href="/mysecondlink">link 2</a>
<a href="/mythirdlink">link 3</a>
<a href="/myfourthlink">link 4</a>
</div>
</div>
<span class="layovermenu" style="font-size:30px;cursor:pointer" onclick="openNav()">MENU</span>
Under CUSTOM <HEAD> CONTENT :
/* Open */
function openNav() {
document.getElementById("myNav").style.display = "block";
}
/* Close */
function closeNav() {
document.getElementById("myNav").style.display = "none";
}
UNDER CUSTOM CSS:
/* overlay menu */
.overlay {
height: 100%;
width: 100%;
display: none;
position: fixed;
z-index: 4;
top: 0;
left: 0;
background-color: rgb(255,255,255);
background-color: rgba(0,0,0);
}
.overlay-content {
position: relative;
top: 25%;
width: 100%;
text-align: center;
margin-top: 30px;
}
.overlay a {
font-family: Futura Pro Bold;
padding: 8px;
text-decoration: none;
font-size: 36px;
color: #ffffff;
display: block;
transition: 0.3s;
}
.overlay a:hover, .overlay a:focus {
color: #ffffff;
}
.overlay .closebtn {
position: absolute;
top: 20px;
right: 45px;
font-size: 60px;
}
.layovermenu {
font-family: Futura Pro Bold;
position:fixed;
width: 100%;
text-align: center;
z-index: 3;
}
@media screen and (max-height: 450px) {
.overlay a {font-size: 20px}
.overlay .closebtn {
font-size: 40px;
top: 15px;
right: 35px;
}
I added the class 'layovermenu' in order to change the font and better position the menu link.
This works great on the desktop version but on mobile the overlay does not show - any tips? @mariusjopen
Thank you!