A recent update (16 october) brought sub-menu's as a built in Lay Theme option:
- Submenu support for desktop and mobile menus! Create a submenu by drag and dropping menupoints in "Appearances" → "Menus".
- Customizer: Added Submenu settings in "Customizer" → "Menu Style" → "Submenus"
Instagram video
Version History
Your custom code is fine except the use of .sub-menu
is now targeting the new menu and your original custom one.
Options could be using Lay Theme's Sub-menu and styling it - or setting up your custom Sub menu with a different name e.g custom-sub-menu
and then targeting with that to avoid clash E.g
.custom-sub-menu {
margin-top: -70px!important;
margin-right: 0% !important;
padding-top: 5%!important;
padding-left: 40px!important;
padding-bottom: 1200px!important;
padding-right: 1% !important;
opacity: 0;
transition: opacity 200ms ease;
-webkit-transition: opacity 200ms ease;
pointer-events: none;
position: fixed;
right: 0px;
background-color: black;
}
Talk soon & best wishes Hanna 🌝
Richard