Skip to content

Instantly share code, notes, and snippets.

@elicus
Last active May 20, 2021 05:10
Show Gist options
  • Save elicus/06572a0d7dbf5286d0f286a60982f517 to your computer and use it in GitHub Desktop.
Save elicus/06572a0d7dbf5286d0f286a60982f517 to your computer and use it in GitHub Desktop.
How To Build Divi Hamburger Menu on Desktop
<style>
.et-menu .menu-item-has-children > a:after {
content: '\4c'!important;
font-size: 24px !important;
font-weight: normal!important;
padding-left: 10px;
right: auto !important;
}
.et-menu .menu-item-has-children > .de-menu-switched-icon:after {
content: '\4d' !important;
font-size: 24px !important;
font-weight: normal!important;
padding-left: 10px;
right: auto !important;
}
.et-menu .menu-item-has-children > a {
position: relative;
}
.et-menu .menu-item-has-children .sub-menu li {
display: none;
}
.et-menu .menu-item-has-children .sub-menu .de-show-menu-items {
display: block;
}
.de-menu .et_pb_menu__menu {
display: block;
}
.de-menu .et_mobile_nav_menu {
display: none;
}
.de-menu .et-menu-nav .et-menu {
align-items: center !important;
flex-direction: column;
}
.de-menu .et-menu > li {
display: flex;
flex-direction: column;
margin-top: 15px !important;
}
.de-menu .sub-menu {
border-top: 0;
box-shadow: none;
display: flex;
flex-direction: column;
left: 0 !important;
opacity: 1;
padding: 0 !important;
position: relative;
top: 4px !important;
visibility: visible;
width: auto;
}
.de-menu .et-menu li li a {
font-size: 20px !important;
font-weight: 600 !important;
padding: 0 0 16px 0;
text-align: center;
width: auto;
}
.de-menu-row {
overflow: auto;
scrollbar-width: none;
transform: translateY(-100%);
transition: all 1s ease;
}
.de-menu-row::-webkit-scrollbar {
display: none;
}
.de-menu-row .et_pb_column {
align-items: center;
display: flex;
min-height: 100vh;
}
.de-menu-row.de-menu-active {
transform: translateY(0);
transition: all 1s ease;
}
.de-menu-ham-icon,
.de-menu-close-icon {
cursor: pointer;
}
.de-menu-ham-icon {
display: inline-block;
float: right;
}
.de-menu-ham-icon .et_pb_main_blurb_image,
.de-menu-close-icon .et_pb_main_blurb_image {
margin-bottom: 0;
}
.de-menu .et-menu li li.menu-item-has-children>a:first-child:after {
top: 0;
}
@media screen and (max-width: 980px) {
.de-menu .et-menu li li a {
font-size: 18px !important;
}
.et-menu .menu-item-has-children > a:after {
font-size: 18px !important;
}
.et-menu .menu-item-has-children > .de-menu-switched-icon:after {
font-size: 18px !important;
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment