Building a navigation with Menu Builder
This tutorial walks through building a complete responsive navigation: a desktop horizontal menu with dropdowns, a mobile hamburger trigger, and an accessible markup structure.
What you’ll build: A sticky nav with logo, horizontal links, a dropdown submenu, and a mobile hamburger menu.
Time to complete: ~40 minutes.
Step 1: Plan your navigation structure
Before touching Site Designer, sketch your nav:
Logo | Home Products ▾ About Blog Contact [CTA Button]
├── Product A
├── Product B
└── Product C
- One level of dropdowns is common and manageable
- Keep top-level items to 5–7 maximum
- The CTA button (rightmost) should be visually distinct
Step 2: Build the nav in Menu Builder
-
Open Menu Builder
Click the Menu Builder icon in the toolbar (or right-click → Insert → Navigation Menu).
-
Add top-level items
Click + Add item to create each nav link: Home, Products, About, Blog, Contact. Set the Label and the href for each (internal pages:
/about.html, external: full URL). -
Add dropdown items under Products
Click the Products item → + Add child item. Add “Product A,” “Product B,” “Product C” as child items, each with their respective hrefs.
-
Set the active page indicator
For the page you’re currently on, check Mark as current — this adds
aria-current="page"to that link automatically. -
Insert into the page
Click Insert Menu — Site Designer places a
<nav>element with a<ul>on the canvas.
Step 3: Style the desktop nav
-
Wrap in a sticky header
Select the nav and wrap it in a
<header>element (right-click → Wrap in → Header). Class:.site-header. Set:position: sticky,top: 0,z-index: 100,background: white,border-bottom: 1px solid #e5e7eb. -
Make the nav a flex row
Select the
<nav>element. Class:.main-nav. Setdisplay: flex,align-items: center,justify-content: space-between,padding: 0 2rem,height: 64px,max-width: 1200px,margin: 0 auto. -
Style the nav list
Select the
<ul>inside nav. Set:display: flex,align-items: center,gap: 0.5rem,list-style: none,margin: 0,padding: 0. -
Style nav links
Select the
<a>elements. Class:.nav-link. Set:display: flex,align-items: center,height: 64px,padding: 0 1rem,color: #374151,text-decoration: none,font-weight: 500,font-size: 0.9375rem. Add a bottom border on hover via the Effects pane (:hover state:border-bottom: 2px solid var(--brand)).
Step 4: Style the dropdown
-
Position the parent li as relative
Select the Products
<li>. Setposition: relative. -
Style the dropdown ul
Select the child
<ul>(the dropdown). Set:position: absolute,top: 100%,left: 0,background: white,border: 1px solid #e5e7eb,border-radius: 8px,padding: 0.5rem,min-width: 200px,box-shadow: 0 8px 24px rgba(0,0,0,0.1),display: none. -
Show dropdown on hover
In the Effects pane for the parent
<li>, enter:hoverstate. Set the child dropdown todisplay: block. Add a transition for smooth appearance: useopacitytransition (set dropdown toopacity: 0initially,opacity: 1on parent hover +display: block). -
Style dropdown links
Dropdown
<a>elements:display: block,padding: 0.625rem 1rem,border-radius: 4px,color: #374151,font-size: 0.875rem. On hover:background: #f3f4f6.
Step 5: Add the mobile hamburger
-
Insert a hamburger button
Insert a Button element in the header. Class:
.hamburger. Three child spans for the three lines (each:display: block,width: 22px,height: 2px,background: currentColor,margin: 4px 0). Addaria-label="Open menu",aria-expanded="false". -
Hide desktop nav and show hamburger at mobile
Enter 768px breakpoint mode. Set
.main-nav ultodisplay: none. Set.hamburgertodisplay: flex. At desktop (base styles):.hamburgerisdisplay: none. -
Build the mobile menu drawer
Insert a Section. Class:
.mobile-menu. Set:position: fixed,inset: 0,background: white,z-index: 200,display: none,flex-direction: column,padding: 2rem. At mobile breakpoint mode, keep asdisplay: noneby default (JS will toggle it). -
Add the toggle script
In Settings → Project → Global Code → Footer, add:
const btn = document.querySelector('.hamburger'); const menu = document.querySelector('.mobile-menu'); btn?.addEventListener('click', () => { const open = menu.style.display === 'flex'; menu.style.display = open ? 'none' : 'flex'; btn.setAttribute('aria-expanded', String(!open)); });
Step 6: Test and publish
Press ⌘P to open Live Preview. Test:
- All nav links go to the right pages
- The dropdown opens on hover (desktop)
- The hamburger opens the mobile menu (resize to 768px or use DevTools)
- Keyboard navigation works (Tab, Enter, Esc)
- The nav stays sticky as you scroll