Archived topic
Secondary nav menu item float
3 replies · Started by Jamal on October 24, 2016
Hi
I'm using secondary nav for the first time and i'm having a hard time keeping the menu-item-float-right to work on mobile.
From "Appearance > Menus" i added a custom link to the secondary navigation with the above css class added, then i put some code in my functions.php to add a "login/logout" and "register" to my secondary nav. On desktop the custom link is as i want it on the right of the login/logout but on mobile the css below is overriding it
@media (max-width: 768px)
.sf-menu>li.menu-item-float-right {
float: none!important;
}
Secondary nav itself is set to above header and aligned right. I have also prevented it from going into mobile mode with a code i got from this forum. Thanks in advance
You'd just need to overwrite that CSS:
@media (max-width: 768px) {
.sf-menu>li.menu-item-float-right {
float: right !important;
}
}
I swear i tried that in the morning but it didnt seem to work. Its working now, Thanks !
You're welcome :)