expressjs / expressjs/expressjs.com

Previous/next navigation can be too wide on small screens

Open Beginner friendly
#2,486 1 comment 0 reactions 0 assignees View on GitHub
bug design
Dominant language
MDX
Stars
5.4k
Forks
2.3k
Avg merge
2d 23m
Merged PRs (30d)
14

Description

Example on https://expressjs.com/en/guide/migrating-4/ (with #2485 ([preview](https://deploy-preview-2485--expressjscom-preview.netlify.app/en/guide/migrating-4/)), because without it tables cause the same problem):

![Screenshot of a mobile preview of "Migrating to Express 4" guide. Previous and Next buttons in bottom navigation both have long descriptions and are placed on the same line. They are too wide, causing a gap on the right in remaining sections on the website.](https://github.com/user-attachments/assets/4e339f96-1d96-4b70-b269-7f48ff8de2f2)

### Possible solutions

1. `flex-wrap: wrap-reverse` in [`.doc-nav`](https://github.com/expressjs/expressjs.com/blob/61e6f789388cf1f56476e9c05550451bcf3347c4/src/components/patterns/DocBottomNav/DocBottomNav.css#L2-L9) - I think that "Next" being above "Previous" should make the navigation easier (most of the time people are reading from start to the end)
Same preview as earlier, but now the Next button shows above the Previous button and both have arrows, which were not visible earlier. The page is sized correctly.
2. `flex-wrap: wrap` in [`.doc-nav`](https://github.com/expressjs/expressjs.com/blob/61e6f789388cf1f56476e9c05550451bcf3347c4/src/components/patterns/DocBottomNav/DocBottomNav.css#L2-L9)
Screenshot similar to the one above (point 1), but the Previous button is above Next.

Contributor guide

Open the contributing guide

Research direction

Start in src/components/patterns/DocBottomNav/DocBottomNav.css, focusing on the .doc-nav rules linked in the issue. Check the navigation on the migrating-to-Express-4 guide at a small viewport and choose the wrapping behavior that keeps both controls within the page width. Done means the Previous/Next navigation no longer causes horizontal overflow or a large empty gap on narrow screens.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.