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 path, we shared key guidelines for construction responsive layouts in Divi 5 with cleaner construction, smarter breakpoint choices, and real-content checking out.

Now, in Phase 7, we’ll focal point on smaller structure patterns that seem on nearly each web site: button teams, navigation menus, breadcrumbs, footer hyperlinks, and tag rows. Those components glance easy, however they are able to be difficult to make responsive as a result of they frequently 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 Machine, you’ll construct versatile button teams, menu rows, and hyperlink sections immediately within the Visible Builder. By means of combining Format Path, Hole, Format Wrapping, Column Magnificence, Module Teams, and responsive sizing, you’ll create interaction-heavy rows that adapt throughout display screen sizes with out duplicating constructions or writing customized CSS for not unusual structure patterns.

Let’s dive in.

Why Button, Menu, And Hyperlink Rows Want Particular Consideration

Buttons, menus, and hyperlink rows are one of the crucial maximum vital interactive components on a web site. 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 frequently have competing structure wishes. On Desktop, they most often glance highest as compact horizontal teams. On Pill, they’ll wish to wrap into a couple of traces. On Telephone, they’ll wish to stack vertically, grow to be complete width, or transfer right into a separate cell menu.

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

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

Core Flexbox Ways For Those Parts

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

Format Path controls the principle drift of the container. Use Row when pieces will have to sit down side-by-side and Column once they will have to stack vertically. You’ll be able to trade this in keeping with breakpoint, which turns out to be useful for button teams that keep horizontal on Desktop however stack on Telephone.

Justify Content material and Align Pieces regulate distribution and alignment. Justify Content material works alongside the principle axis, whilst Align Pieces works alongside the go axis. In combination, they allow you to heart icon-and-text pairs, distribute navigation teams, and stay buttons aligned within their mum or dad container.

justify content and align items

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

horizontal and vertical gap

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

In the end, Module Groups permit you to create smaller structure contexts within a bigger row or column. Wrap similar buttons, hyperlinks, icons, or menu pieces in a Module Staff so you’ll observe impartial Flexbox settings with out affecting the remainder of the structure.

using module groups in Divi 5

In combination, those controls allow you to construct reusable, responsive interplay rows with much less handbook spacing and less breakpoint-specific fixes.

Actual-International Examples

Let’s take a look at 5 examples that display the right way to create versatile button, menu, and hyperlink rows the use of Divi 5’s Flexbox options. Each and every one comprises the Desktop structure, 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 grow to be cramped when display screen width is proscribed, particularly when labels are longer or a couple of CTAs sit down side-by-side.

The Resolution: Position the buttons within 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  ⚠️ Reduce Your Current Subscription Cost by 73% With Two Clicks!

Settings Used: Position a Module Staff with 3 Button modules within 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 worth comparable to 90vw, then set the Button module alignment to Heart.

Instance 2: Breadcrumb Hyperlink Row

Flexbox example 2

Purpose: Create a horizontal breadcrumb row that continues to be readable on Desktop whilst stacking well on Telephone.

The Problem On Cell: Breadcrumb hyperlinks can grow to be cramped or wrap awkwardly, making the row more difficult to scan and faucet on smaller monitors.

The Resolution: Position the breadcrumb hyperlinks within a Module Staff. Use Format Path > Row on Desktop and Pill for a horizontal drift, then transfer to Format Path > Column on Telephone. Alter 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 Heart.

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 remainder alignment settings unchanged.

breadcrumb mobile settings

Instance 3: Footer With Hyperlink Teams

Flexbox example 3

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

The Problem On Cell: Footer hyperlinks can grow to be cramped, asymmetric, or arduous to scan when the structure 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 regulate spacing between the hyperlink columns. On the Module Staff point, gaps regulate spacing between the person hyperlinks within every team.

Settings Used: On the Row point, set the Horizontal Hole to 25%, the Vertical Hole to 30px, and permit 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 Heart so the hyperlink teams align well within the stacked structure.

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 grow to be cramped or misaligned, and the button team would possibly want other sizing habits than the principle menu.

The Resolution: Use a mum or dad Column for the whole header row and Module Teams for similar pieces. The emblem and menu can sit down in a single team, whilst the CTA buttons can sit down in every other. This offers 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 House Between, and set Align Pieces to Heart.

header column level settings

For the Module Staff, set Justify Content material to House Between and Align Pieces to Heart.

header module group settings desktop

At the Telephone breakpoint, set the Column Vertical Hole to 15px and go away the remainder settings unchanged except your design wishes a distinct cell 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 the end, 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 better monitors and wraps naturally on smaller monitors.

The Problem On Cell: Tag clouds can grow to be cramped, asymmetric, or arduous to faucet when tag lengths range.

The Resolution: Use a unmarried Column or Module Staff with Format Path > Row and Format Wrapping > Wrap. Follow Horizontal Hole and Vertical Hole on the mum or dad point so tags have constant spacing as they wrap. Since the structure is designed to wrap naturally, it might frequently 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 Heart, and Format Wrapping is enabled. Those settings stay constant throughout breakpoints.

tag cloud flex settings

Step-By means of-Step Construct

Let’s stroll thru construction a customized menu that features a emblem, navigation hyperlinks, a CTA, and a cell menu. By means of the top, you’ll know how 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 permit Format Wrapping > Wrap.

row flex settings

Open the Column settings and pass 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 House Between, set Align Pieces to Heart, and permit Format Wrapping > Wrap.

first column flex settings

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

See also  Everything You Need To Know About Semantic Elements In Divi 5

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

second column settings

Prior to shifting on, open the primary Column and assign a Background Colour, 15px Border Radius, and 10px Padding on all 4 facets.

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 Heart.

icon group flex settings

Upload a Social Media Apply module outdoor of the Staff and magnificence 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 cling 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 Heart.

second column module group settings

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

Within the Hyperlink module’s Content material tab, amplify the Loop possibility team and permit Loop Part. Make a selection Menu because the Question Kind and select your primary 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 select 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

Conceal the hamburger Icon module on Desktop so it simplest 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 cell menu. Click on the Canvas dropdown menu, make a choice Upload Canvas, give it a reputation comparable to Cell Menu, set a Z-Index of 99999, and click on Upload Canvas.

add a new canvas in Divi 5

When the Canvas quite a bit, upload a single-column row with an Icon module and a Module Staff. Open the Phase settings and pass to the Design tab. Make bigger the Sizing possibility team and set the Width and Max Width to 80%. Make a selection Heart for the Phase 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 Measurement, and amplify the Sizing possibility team to set the Alignment to Finish.

icon alignment

Upload a Hyperlink module, genre it, and permit looping to your WordPress menu.

Create The Interactions

Prior to final the Canvas, create an Interaction that closes the cell menu on click on. Make a selection the Icon module and pass to the Complex tab. Make bigger the Interactions possibility team and click on + Upload Interplay.

add Divi 5 interaction

Make a selection Click on because the Cause Tournament, give the Interplay a reputation, select Conceal Part because the Impact Motion, and select Phase (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

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

disable mobile menu section

In the end, open the Place possibility team, set Place to Absolute, set Offset Beginning to Most sensible Heart, and observe a -50px Vertical Offset so the cell menu seems close to the principle menu when opened. It’s possible you’ll wish to regulate this worth relying in your header top and spacing.

set a vertical offset

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

open mobile menu interaction

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

Best possible Practices And Pointers

Listed below are a couple of sensible guidelines that can assist you construct higher button, menu, and hyperlink rows with Divi 5.

1. Make a selection Wrap Vs. Column Path Correctly

Use Format Wrapping when you wish to have pieces to drift naturally onto new traces as area turns into restricted. This works neatly for tag clouds, hyperlink rows, and button teams that take pleasure in computerized wrapping.

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

2. Prioritize Vital CTAs With Show Order

On cell, you’ll use Show Order to transport a number one button, key hyperlink, or vital menu merchandise previous within the visible drift. A unfavourable worth, comparable to -1, can pull an merchandise forward of alternative components at a selected breakpoint.

Use this selectively. A blank supply order will have to nonetheless do many of the paintings, with Show Order used simplest when the cell hierarchy wishes a centered 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 web page in your web site. Upload a unmarried Hyperlink module, open its settings, pass to the Loop possibility team, and toggle Loop Part on. Set the Question Kind to Menu and select your WordPress menu.

The use of the Loop Builder will provide you with extra regulate over hyperlink styling and is helping your menu mirror updates when the hooked up WordPress menu adjustments.

See also  8 Best WordPress Image Optimization Plugins in 2023

4. Use Flexbox Controls For Fast Alignment

For an ordinary emblem, menu, and button structure, set the mum or dad container to Format Path > Row, set Align Pieces to Heart, and use Justify Content material > House Between. This will place the emblem, navigation, and CTA in a balanced horizontal row with out depending on handbook margins.

Then use Module Teams when a part of the header wishes its personal alignment habits, comparable 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 complex setups, comparable to cell overlays, dropdown-style menus, or mega menus. Whilst Hyperlink modules paintings neatly 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 will help you apply alongside, we’ve created a zipper document containing the examples from this publish. You’ll in finding an ALL document containing all sections, a folder with person sections, and a folder containing the whole step by step instance.

downloadable JSON files

To make use of the ALL document 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, select an person JSON document or the ALL document 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 piece to the web page.

add new section to Divi

Transfer to Upload From Library and select 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, permit the Export & Import Web page Bar Icon. Click on the Workspace icon within the Builder Bar, find Export & Import below 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 By means of Step.json document, and make a choice Import Format. This JSON document will have to be uploaded this strategy to import the Cell Menu Canvas related to it.

import page layout into Divi 5

In case you plan to make use of the instance as your web site’s navigation, you’ll upload it as a International Header within the Theme Builder after uploading the structure.

add new global header

Grasp Versatile Button, Menu, And Hyperlink Rows With Flexbox

With Divi 5 and its Flexbox Layout System, you’ll 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 trend. Use Row course for horizontal layouts, Column course for strict vertical stacks, Hole for centralized spacing, Format Wrapping for herbal line breaks, and Module Teams when a collection of components wishes its personal structure habits.

In Phase 8, we’ll dive deeper into one of the crucial largest workflow shifts in Divi 5: the use of Gaps as a substitute of handbook margin for cleaner spacing methods.

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

The publish Part 7 Of Mastering Flexbox: Building Flexible Button, Menu, And Link Rows gave the impression 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!