Dynamic breakpoint oxygen builder meu elementOxygen builder navigation element

Add a dynamic break point to your horizontal navigation menu in Oxygen Builder to have a dynamic linebreak on mobile devices.

This article explains why the oxygen menu items does not wrap it's children into a new row when they are overflowing the screen. To understand this article you will require a basic understanding on flex-box. You can watch this video by Kevin Powell or read about flexbox on the MDN Docs.

The 'issue' with the native menu in oxygen

The Oxygen menu's ol element is set up as a flex-box, but does not contain a 'flex-wrap:wrap', which allows flex elements that would horizontally overflow

  1. Create a stylesheet in Oxygen Builder
  2. Add this code to your style sheet:
    /*Target ul selector of the relevant menu class swap .menu--footer for relevant menu class or #selector*/
    .menu--footer ul {
    flex-wrap:wrap;
    }

    /*Target li selector withing the list targeted above swap .menu--footer for relevant menu class or #selector*/
    .menu--footer ul li{
    width: fit-content !important;
    }
  3. Apply the class '.menu--footer' to your menu element in the Oxygen editor
responsive horizontal oxygen builder navigation menu
responsive horizontal oxygen builder navigation menu
/*Replace .menu with your menu class*/
.menu--footer ul {
flex-wrap:wrap;
}


.menu--footer ul li{
width: fit-content !important;
}

Recent posts:

How to fix max file size error WordPress/Plesk (upload_max_filesize)

If you've ever tried uploading a big file to your website and got hit with an annoying "file exceeds maximum upload size" error — you're not alone. I recently had to deal with this while working on one of my sites, and after a bit of digging, I found the simplest way to sort it […]

Single Template in Oxygen Builder Displays 404

In this article I share the main issues that can occur if your Oxygen builder template displays a 404 Error.

How to host your website for free

Learn how to host your website for free using Netlify's hosting in combination with GitHub's source control. This method is ideal for those who want a simple, static website without ongoing hosting costs.

Start your project today

Get in touch
Contact Form
chevron-left