L
LLLOS.ai
Career
L
◆ AI Learning · Hard rule

How should a hamburger menu behave when a user clicks on its items?

A hamburger menu must close when a user selects an item. In-page links must scroll smoothly with a header offset. Cross-page links must open in a new tab.

By Pawan Nayar · from the LLOS AI Learning record

The rule

A hamburger menu must close when a user selects an item.

In-page links must scroll smoothly with a header offset. Cross-page links must open in a new tab.

When a user taps a menu item, the menu must close right away. This happens before the page moves or loads. A menu that stays open feels broken to the user. Links that go to a different part of the same page must scroll smoothly. The scroll should take about 1.6 seconds. The page must stop scrolling so the sticky header does not cover the section title. Links that go to a different page must open in a new browser tab. The original page must stay open. This lets the user explore new content without losing their place on the first page.

A developer creates a website with a hamburger menu. A user clicks an item in the menu. The menu stays open while the page scrolls. The user feels confused because the menu blocks part of the screen. The developer then fixes the menu to close immediately on selection.

Words you'll need

Resolved from this lesson's own record — real definitions, not invented for this page.

Human-Computer Interaction

How people and computers communicate and work together

Information Architecture

How information is organized and labeled so people find it

Questions people ask

More from the same record, pulled by shared topic — not written new for this page.

How can a developer design an AI application's user interface to be clear and stable?

A developer must design carousels with fixed sizes. The longest content slide sets the total height.

How can a developer prevent user interface elements from becoming too large or hard to read?

A developer must use plain language and avoid technical jargon. This applies to all communication and code comments.

How can a developer make sure an overlay pane does not change the page layout?

A developer must use `position: fixed` or `position: absolute` for an overlay pane. This makes the pane float above other content.

When should a developer use a navigation menu that lets a user jump between sections of a long article?

A developer should use this navigation for articles or pages with 6 to 12 named sections. The user can quickly go to any section without getting lost.

What to remember

A hamburger menu must close when a user selects an item. In-page links must scroll smoothly with a header offset. Cross-page links must open in a new tab.