How to align the last menu item’s submenu to the right in Oxygen

Is your Oxygen‘s nav menu’s last item’s submenu causing a white gap to the right of your webpages?

Before:

Simply add this CSS to fix:

.oxy-nav-menu .oxy-nav-menu-list > .menu-item:last-child > .sub-menu {
  right: 0;
}

After:

By default, the submenus will be absolutely positioned and will appear when hovered aligned left i.e., with their left edges aligned with the left edges of their parent menu item. With the above code, we are setting aligning the right edge for the submenu of the last menu item in the navigation.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *