Part 7 Of Mastering Flexbox: Building Flexible Button, Menu, And Link Rows

by | Jul 20, 2026 | Etcetera | 0 comments

In Part 6 of our Mastering Flexbox route, we shared key guidelines for construction responsive layouts in Divi 5 with cleaner construction, smarter breakpoint selections, and real-content trying out.

Now, in Section 7, we’ll focal point on smaller format patterns that seem on virtually each and every web page: button teams, navigation menus, breadcrumbs, footer hyperlinks, and tag rows. Those parts glance easy, however they may be able to be tough to make responsive as a result of they continuously wish to keep horizontal on Desktop, wrap cleanly on Pill, and stack or amplify on Telephone with out feeling cramped.

With Divi 5’s Flexbox Format Device, you’ll be able to construct versatile button teams, menu rows, and hyperlink sections without delay within the Visible Builder. Via combining Format Path, Hole, Format Wrapping, Column Magnificence, Module Teams, and responsive sizing, you’ll be able to create interaction-heavy rows that adapt throughout display screen sizes with out duplicating constructions or writing customized CSS for not unusual format patterns.

Let’s dive in.

Why Button, Menu, And Hyperlink Rows Want Particular Consideration

Buttons, menus, and hyperlink rows are probably the most maximum necessary interactive parts on a web page. They information customers to key pages, movements, classes, and conversion issues, so that they wish to stay transparent and simple to make use of throughout display screen sizes.

The problem is that those rows continuously have competing format wishes. On Desktop, they in most cases glance perfect as compact horizontal teams. On Pill, they will wish to wrap into more than one traces. On Telephone, they will wish to stack vertically, develop into complete width, or transfer right into a separate cellular menu.

Not unusual issues come with cramped spacing, misaligned icons and labels, buttons which are too small to faucet very easily, menu rows that damage awkwardly on Pill, and hyperlink teams that lose their construction once they wrap.

Divi 5’s Flexbox equipment lend a hand resolve those problems on the container point. As a substitute of including guide margins to each and every merchandise or duplicating separate cellular variations, you’ll be able to use parent-level controls like Horizontal Hole, Vertical Hole, Format Path, and Format Wrapping to regulate how the crowd behaves.

Core Flexbox Tactics For Those Components

Growing versatile button, menu, and hyperlink rows in Divi 5 turns into more uncomplicated as soon as you recognize which Flexbox controls do the heavy lifting.

Format Path controls the primary drift of the container. Use Row when pieces will have to take a seat side-by-side and Column once they will have to stack vertically. You’ll be able to exchange this in line with breakpoint, which comes in handy for button teams that keep horizontal on Desktop however stack on Telephone.

Justify Content material and Align Pieces keep watch over distribution and alignment. Justify Content material works alongside the primary axis, whilst Align Pieces works alongside the pass axis. In combination, they will let you middle icon-and-text pairs, distribute navigation teams, and stay buttons aligned inside of their mother or father container.

justify content and align items

Horizontal Hole and Vertical Hole supply constant spacing between direct kid pieces with out including margins to each and every button, hyperlink, or module. That is particularly helpful when a row wraps for the reason that spacing between pieces and features remains centralized in a single position.

horizontal and vertical gap

Format Wrapping shall we pieces transfer onto further traces once they not have compatibility in a single row. Mix it with Column Magnificence or Construction Templates when you wish to have extra keep watch over over what number of pieces seem in line with line at every breakpoint.

In any case, Module Groups help you create smaller format contexts inside of a bigger row or column. Wrap comparable buttons, hyperlinks, icons, or menu pieces in a Module Staff so you’ll be able to observe unbiased Flexbox settings with out affecting the remainder of the format.

using module groups in Divi 5

In combination, those controls will let you construct reusable, responsive interplay rows with much less guide spacing and less breakpoint-specific fixes.

Actual-International Examples

Let’s take a look at 5 examples that display learn how to create versatile button, menu, and hyperlink rows the use of Divi 5’s Flexbox options. Each and every one comprises the Desktop format, the responsive problem, and the settings used.

Instance 1: Versatile Button Staff

Flexbox example 1

Purpose: Create a row of buttons that remains well spaced on Desktop, then stacks and expands on Telephone for more uncomplicated tapping.

The Problem: Buttons can develop into cramped when display screen width is proscribed, particularly when labels are longer or more than one CTAs take a seat side-by-side.

The Resolution: Position the buttons inside of a Module Staff. Use Format Path > Row on Desktop and Pill, then transfer the Staff to Format Path > Column on Telephone. Use Horizontal Hole and Vertical Hole for spacing, then regulate the button sizing on Telephone when you wish to have the buttons to span many of the viewport.

See also  Divi Community Updates: Fall 2024

Settings Used: Position a Module Staff with 3 Button modules inside of a single-column row. On the Desktop and Pill breakpoints, set the Staff’s Format Path to Row and observe a 10px Horizontal Hole and 10px Vertical Hole.

button group desktop settings

At the Telephone breakpoint, transfer the Staff’s Format Path to Column.

button group phone settings

Then, widen every button on Telephone the use of the Sizing choices within the Button module’s Design tab. Set the Button Width and Button Max Width to a price akin to 90vw, then set the Button module alignment to Middle.

Instance 2: Breadcrumb Hyperlink Row

Flexbox example 2

Purpose: Create a horizontal breadcrumb row that is still readable on Desktop whilst stacking well on Telephone.

The Problem On Cell: Breadcrumb hyperlinks can develop into cramped or wrap awkwardly, making the row tougher to scan and faucet on smaller monitors.

The Resolution: Position the breadcrumb hyperlinks inside of a Module Staff. Use Format Path > Row on Desktop and Pill for a horizontal drift, then transfer to Format Path > Column on Telephone. Modify the vertical spacing so the breadcrumb stays compact however readable.

Settings Used: Set the Module Staff’s Format Path to Row at the Desktop and Pill breakpoints. Upload a 10px Horizontal Hole and 10px Vertical Hole, then set Justify Content material and Align Pieces to Middle.

breadcrumb desktop settings

At the Telephone breakpoint, set the Module Staff’s Format Path to Column, regulate the Vertical Hole to 5px, and stay the rest alignment settings unchanged.

breadcrumb mobile settings

Instance 3: Footer With Hyperlink Teams

Flexbox example 3

Purpose: Create a multi-column footer with hyperlink teams, akin to Product, Corporate, Assets, and Criminal, that remains arranged on Desktop and stacks cleanly on Telephone.

The Problem On Cell: Footer hyperlinks can develop into cramped, asymmetric, or laborious to scan when the format narrows.

The Resolution: Use a row with Format Wrapping enabled and regulate gaps at each the row and Module Staff ranges. On the row point, gaps keep watch over spacing between the hyperlink columns. On the Module Staff point, gaps keep watch over spacing between the person hyperlinks inside of every team.

Settings Used: On the Row point, set the Horizontal Hole to 25%, the Vertical Hole to 30px, and allow Format Wrapping.

footer row settings on desktop

On the Row’s Telephone breakpoint, set the Vertical Hole to 20px.

footer row settings mobile

At the Desktop breakpoint, set every Module Staff’s Vertical Hole to 10px.

footer group settings desktop

For every Module Staff on the Telephone breakpoint, stay the spacing settings unchanged and set Align Pieces to Middle so the hyperlink teams align well within the stacked format.

footer group settings mobile

Instance 4: Header Navigation With A Nested Button Staff

Flexbox example 4

Purpose: Construct a header with an emblem, navigation hyperlinks, and a button team that remains horizontal on Desktop however adapts cleanly on Pill and Telephone.

The Problem On Cell: Navigation hyperlinks and buttons can develop into cramped or misaligned, and the button team might want other sizing conduct than the primary menu.

The Resolution: Use a mother or father Column for the entire header row and Module Teams for comparable pieces. The brand and menu can take a seat in a single team, whilst the CTA buttons can take a seat in every other. This provides every a part of the header its personal Flexbox settings and responsive sizing.

Settings Used: On the Column point, set the Format Path to Row, set the Horizontal Hole and Vertical Hole to 10px, set Justify Content material to Area Between, and set Align Pieces to Middle.

header column level settings

For the Module Staff, set Justify Content material to Area Between and Align Pieces to Middle.

header module group settings desktop

At the Telephone breakpoint, set the Column Vertical Hole to 15px and depart the rest settings unchanged except your design wishes a special cellular construction.

header column level settings mobile

Along with the Flexbox settings, regulate the Sizing for the Module Staff throughout breakpoints. Set the Staff width to 75% on Desktop, 65% on Pill, and 100% on Telephone. This is helping the emblem and menu team use the to be had width extra successfully on smaller monitors.

group phone sizing

In any case, set every Button‘s width to 80vw at the Telephone breakpoint so the buttons can span many of the viewport.

header button sizing phone

Instance 5: Tag Cloud

Flexbox example 5

Purpose: Create a versatile tag cloud or class row that flows horizontally on higher monitors and wraps naturally on smaller monitors.

The Problem On Cell: Tag clouds can develop into cramped, asymmetric, or laborious to faucet when tag lengths range.

The Resolution: Use a unmarried Column or Module Staff with Format Path > Row and Format Wrapping > Wrap. Observe Horizontal Hole and Vertical Hole on the mother or father point so tags have constant spacing as they wrap. Since the format is designed to wrap naturally, it will probably continuously use the similar Flexbox settings throughout breakpoints.

Settings Used: The Column makes use of Format Path > Row, a 10px Horizontal Hole, and a 10px Vertical Hole. Justify Content material and Align Pieces are each set to Middle, and Format Wrapping is enabled. Those settings stay constant throughout breakpoints.

tag cloud flex settings

Step-Via-Step Construct

Let’s stroll thru construction a customized menu that features a emblem, navigation hyperlinks, a CTA, and a cellular menu. Via the tip, you’ll know the way to mix Flexbox, Module Teams, Hyperlink loops, Canvases, and Interactions for a responsive navigation workflow.

flexbox example 6

Set Up The Major Row Construction

Get started by way of including a single-column row to a brand new web page within the Visible Builder. If wanted, make a choice Flex because the Format Taste. Within the Row’s Design tab, amplify the Format possibility team. Set the Horizontal Hole to 0px, set the Vertical Hole to 5px, and allow Format Wrapping > Wrap.

row flex settings

Open the Column settings and move to the Design tab. Within the Format possibility team, set the Format Path to Row so pieces drift from left to proper. Set Justify Content material to Area Between, set Align Pieces to Middle, and allow Format Wrapping > Wrap.

first column flex settings

Now upload every other Column to the Row. Within the Row’s Content material tab, amplify the Components possibility team and click on the + Upload Part button so as to add the Column.

See also  How To Benefit As A White Label WPMU DEV Web hosting Reseller

Transfer to the Design tab for the brand new Column. Set Format Path to Row, Justify Content material to Area Between, Align Pieces to Middle, and Format Wrapping to Wrap.

second column settings

Sooner than transferring on, open the primary Column and assign a Background Colour, 15px Border Radius, and 10px Padding on all 4 aspects.

Upload Modules To The Row

Within the first Column, upload a Module Staff to carry an Icon module and a Textual content module. Taste the modules as wanted. Then, within the Staff’s Format settings, set the Horizontal Hole to 10px, set Format Path to Row, and set Align Pieces to Middle.

icon group flex settings

Upload a Social Media Practice module outdoor of the Staff and elegance it as wanted.

social media follow module

In the second one Column, upload an Symbol module and two Module Teams. The Symbol module will function the emblem. The Module Teams will dangle the navigation hyperlinks, hidden hamburger icon, and CTA.

second column modules

Within the first Staff’s Format settings, set Horizontal Hole to 15px, Format Path to Row, Justify Content material to Finish, and Align Pieces to Middle.

second column module group settings

Upload a Hyperlink module to the Staff and elegance the hyperlink as wanted, together with hover and energetic states.

Within the Hyperlink module’s Content material tab, amplify the Loop possibility team and allow Loop Part. Choose Menu because the Question Kind and make a selection your major menu.

create a link loop

To assign the menu merchandise names, amplify the Textual content possibility team, click on the Insert Dynamic Content material icon, and make a selection Loop Menu Textual content.

In the second one Module Staff, upload an Icon module and a Button module, then genre them as wanted. Within the Staff’s Design tab, set the Format Path to Row.

group layout direction

Cover the hamburger Icon module on Desktop so it most effective seems on the Pill and Telephone breakpoints.

icon visibility settings

Then cover the Module Staff with the desktop navigation hyperlinks at the Pill and Telephone breakpoints.

hide desktop menu on mobile devices

Create The Cell Menu

On this step, we’ll create a separate Canvas to carry the cellular menu. Click on the Canvas dropdown menu, make a choice Upload Canvas, give it a reputation akin to Cell Menu, set a Z-Index of 99999, and click on Upload Canvas.

add a new canvas in Divi 5

When the Canvas a lot, upload a single-column row with an Icon module and a Module Staff. Open the Segment settings and move to the Design tab. Enlarge the Sizing possibility team and set the Width and Max Width to 80%. Select Middle for the Segment Alignment.

section alignment

Then open the Column settings and set the Vertical Hole to 10px.

set mobile menu vertical gap

Subsequent, open the Module Staff settings and set the Horizontal Hole and Vertical Hole to 15px.

mobile menu module group settings

Assign a Shut icon to the Icon module, set an Icon Dimension, and amplify the Sizing possibility team to set the Alignment to Finish.

icon alignment

Upload a Hyperlink module, genre it, and allow looping on your WordPress menu.

Create The Interactions

Sooner than last the Canvas, create an Interaction that closes the cellular menu on click on. Choose the Icon module and move to the Complex tab. Enlarge the Interactions possibility team and click on + Upload Interplay.

add Divi 5 interaction

Select Click on because the Cause Match, give the Interplay a reputation, make a selection Cover Part because the Impact Motion, and make a selection Segment (Cell Menu) because the Goal Module.

Tip: To make Interactions more uncomplicated to regulate, label your sections obviously so they’re simple to spot within the Layers Panel.

set mobile menu interaction

Sooner than heading again to the Major Canvas, amplify the Visibility possibility team and disable the cellular menu segment on all breakpoints. Save the Canvas.

disable mobile menu section

In any case, open the Place possibility team, set Place to Absolute, set Offset Foundation to Most sensible Middle, and observe a -50px Vertical Offset so the cellular menu seems close to the primary menu when opened. You could wish to regulate this price relying for your header top and spacing.

set a vertical offset

Transfer again to the Major Canvas, make a choice the hamburger Icon module, move to the Complex tab, amplify the Interactions possibility team, and create a brand new Interplay that opens the cellular menu on click on.

open mobile menu interaction

Save the Major Canvas, open the web page in a brand new tab, and check the capability.

Highest Practices And Guidelines

Listed here are a couple of sensible guidelines that will help you construct higher button, menu, and hyperlink rows with Divi 5.

1. Select Wrap Vs. Column Path Correctly

Use Format Wrapping when you wish to have pieces to drift naturally onto new traces as house turns into restricted. This works smartly for tag clouds, hyperlink rows, and button teams that have the benefit of computerized wrapping.

Transfer to Column path when you wish to have a strict vertical stack, akin to a cellular menu or full-width CTA team. Keep away from forcing Column path too early, particularly on Pill, as a result of it will probably make layouts longer than essential.

2. Prioritize Necessary CTAs With Show Order

On cellular, you’ll be able to use Show Order to transport a number one button, key hyperlink, or necessary menu merchandise previous within the visible drift. A unfavorable price, akin to -1, can pull an merchandise forward of alternative parts at a particular breakpoint.

Use this selectively. A blank supply order will have to nonetheless do many of the paintings, with Show Order used most effective when the cellular hierarchy wishes a focused adjustment.

3. Use The Loop Builder For Menu Hyperlinks

When construction customized menus with the Hyperlink module, you do not want to manually create a separate Hyperlink module for each and every web page for your web page. Upload a unmarried Hyperlink module, open its settings, move to the Loop possibility team, and toggle Loop Part on. Set the Question Kind to Menu and make a selection your WordPress menu.

The use of the Loop Builder will give you extra keep watch over over hyperlink styling and is helping your menu mirror updates when the attached WordPress menu adjustments.

See also  🎁 Unpacking Divi Black Friday Bundles: $1,000+ In Savings!

4. Use Flexbox Controls For Fast Alignment

For an ordinary emblem, menu, and button format, set the mother or father container to Format Path > Row, set Align Pieces to Middle, and use Justify Content material > Area Between. This may place the emblem, navigation, and CTA in a balanced horizontal row with out depending on guide margins.

Then use Module Teams when a part of the header wishes its personal alignment conduct, akin to a menu team, social icon team, or CTA button team.

5. Construct Extra Complex Menus With Interactions And Canvases

You’ll be able to use Divi 5’s Interactions and more moderen menu features to create extra complicated setups, akin to cellular overlays, dropdown-style menus, or mega menus. Whilst Hyperlink modules paintings smartly for easy navigation rows, the more moderen Hyperlink and Dropdown modules, Canvases, Loop Builder, and Interactions make it imaginable to construct extra customized navigation patterns throughout the Visible Builder.

Obtain The Layouts

That can assist you observe alongside, we’ve created a zipper record containing the examples from this submit. You’ll to find an ALL record containing all sections, a folder with person sections, and a folder containing the entire step by step instance.

downloadable JSON files

To make use of the ALL record or person sections, import them into the Divi Library. Pass to Divi > Divi Library and click on the Import & Export button.

Divi Library import

Transfer to the Import tab, make a selection an person JSON record or the ALL record out of your laptop, and make a choice Import Divi Builder Layouts.

import divi layouts

To make use of an imported segment, open a web page within the Visible Builder. Click on the blue + icon so as to add a bit to the web page.

add new section to Divi

Transfer to Upload From Library and make a selection the segment you wish to have so as to add to the web page.

add section to a Divi page

For the step by step instance, allow the Export & Import Web page Bar Icon. Click on the Workspace icon within the Builder Bar, find Export & Import underneath Web page Bar Icons, and click on the Export & Import icon within the peak bar of the Visible Builder.

enable export and import

Transfer to the Import tab, find the folder containing the Menu – Step Via Step.json record, and make a choice Import Format. This JSON record should be uploaded this technique to import the Cell Menu Canvas related to it.

import page layout into Divi 5

For those who plan to make use of the instance as your web page’s navigation, you’ll be able to upload it as a World Header within the Theme Builder after uploading the format.

add new global header

Grasp Versatile Button, Menu, And Hyperlink Rows With Flexbox

With Divi 5 and its Flexbox Layout System, you’ll be able to construct button teams, hyperlink rows, customized menus, and tag clouds that adapt throughout display screen sizes whilst staying more uncomplicated to handle.

The important thing is picking the right construction for every development. Use Row path for horizontal layouts, Column path for strict vertical stacks, Hole for centralized spacing, Format Wrapping for herbal line breaks, and Module Teams when a collection of parts wishes its personal format conduct.

In Section 8, we’ll dive deeper into one of the vital largest workflow shifts in Divi 5: the use of Gaps as an alternative of guide margin for cleaner spacing programs.

Download Divi 5, import the instance layouts integrated with this submit, and get started experimenting with versatile button, menu, and hyperlink rows. Drop a remark beneath and tell us which instance you discovered most dear, or what navigation problem you’re nonetheless running thru.

The submit Part 7 Of Mastering Flexbox: Building Flexible Button, Menu, And Link Rows seemed first on Elegant Themes Blog.

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!