Skip to content

Conversation

@ritorhymes
Copy link
Contributor

Summary

This PR for the 2021 site fixes site-wide broken mobile layouts caused by horizontal overflow from the header title container .md-header__title--active. The fix restores normal page behavior for all pages within the affected viewport widths ≤ 959px by preventing:

  1. horizontal page scroll
  2. the header from being hidden when scrolling
  3. excess whitespace along the right side of the header and footer
  4. unintended zoom out and panning behaviors on mobile devices

It adds override.css for a targeted fix and imports it from mkdocs.yml (required to apply the CSS file to the theme).

Closes #884

Testing

You can test the fix at this live demo site top10-21.ritovision.com or on a local build.

To verify:

  • Navigate to any page (Home and About are good examples) on a mobile device (under 960px width)
  • Confirm there is no horizontal overflow and no excess whitespace around the sides of the header and footer
  • Scroll down and confirm the header remains visible (fixed) and does not disappear

I have tested and confirmed the fix is stable across Chrome, Firefox, Edge, Opera mobile and desktop browsers.

Note: In testing a comparison of the updated fix and the current site build, you should test with a mobile browser on a mobile device since desktop browsers have shown inconsistent reproduction of the issue compared to on mobile.

Before and After Screenshots

The issue manifests the same across all pages on the site, so the Home and About pages were chosen here as a representative demonstration of all other pages being fixed. Screenshots from Chrome mobile browser at around 450px screen size.

Top of Homepage - BEFORE
Notice the excess whitespace along the right side of the header

Homepage zoomed out with whitespace along the header

Bottom of Homepage - BEFORE
Notice the fixed header is missing and there is excess whitespace along the right side of the footer

Bottom of homepage with missing header and broken footer

Bottom of Homepage - AFTER
Notice the header is still visible while at the bottom of the page, and both the header and footer take up the full page width without any excess whitespace on the right side.

bottom of the homepage with page behaving normally

About page - BEFORE
Notice the same excess whitespace to the right of the header as on the homepage

About page zoomed out

About page - AFTER
Notice there is no more excess whitespace to the right of the header

about AFTER screenshot

@Neil-Smithline Neil-Smithline added the not-2025-critical Not required for 2025 release label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-2025-critical Not required for 2025 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2021: mobile layout broken site-wide

2 participants