Skip to content

Instantly share code, notes, and snippets.

@hbaker
Created January 25, 2018 01:58
Show Gist options
  • Save hbaker/3d0850f5f32dfb1ece382aa1aed0eaa9 to your computer and use it in GitHub Desktop.
Save hbaker/3d0850f5f32dfb1ece382aa1aed0eaa9 to your computer and use it in GitHub Desktop.
Divi Theme - Float Menu Left and Some Items Right
/** FLOAT MENU LEFT **/
@media only screen and (min-width: 768px) {
#et-top-navigation {
float: left;
padding-left: 317px; /* Adjust to accomodate width of logo */
width: 100%;
}
nav#top-menu-nav, nav#top-menu-nav #top-menu {
width: 100%;
}
/* Create .float-right class to float some nav items right */
#top-menu li.float-right {
float: right;
}
/* Add padding back to last item to fix first item padding issue */
#top-menu>li:last-child {
padding-right: 22px;
}
}
/** END FLOAT MENU LEFT **/
/* HIDE RIGHT-ALIGNED ITEMS BREAKPOINT */
@media only screen and ( max-width: 1255px ) { /* Adjust this width to set hiding point */
#top-menu li.float-right { display: none; }
}
/* END HIDE RIGHT-ALIGNED ITEMS BREAKPOINT */
@vjks
Copy link

vjks commented Sep 24, 2019

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment