Dynamic breakpoint oxygen builder menu 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:

  3. /*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;
    }
  4. 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 I Tripled Conversions on the Same Google Ads Budget

When I took over a Google Ads account in February, the previous agency had done what most agencies do: optimised for vanity metrics. More clicks. More impressions. More keywords. More "activity" to justify their monthly retainer. The client was spending the same amount every month and getting… about the same mediocre results every month. By […]
adding layer to php plugin

How to Wrap WordPress Plugin Stylesheets in CSS Cascade Layers

Learn how to wrap WordPress plugin stylesheets in CSS cascade layers for clean, maintainable style overrides without specificity hacks or !important.

How to Query Reordered Meta Box Posts in Bricks Builder (Complete Guide)

I have recently tried to query posts in bricks builder in the order that I have reordered them with meta box's drag and drop feature. In short you will have to order by menu_order and then choose ascending. The menu_order value is stored in your _posts table: Understanding Meta Box's Reordering System When you use […]

Start your project today

Get in touch
Contact Form
crosschevron-left