Fixed/sticky elements don't obscure content on small screens
Why it matters
A 64px fixed header with no corresponding top padding on <main> hides the first 64 pixels of every page — headlines cut off, form labels disappear, the top of a modal sits beneath the header. A fixed cookie banner or chat widget at the bottom does the same thing in reverse, covering the footer and any sticky CTA. The fix is trivial but easy to overlook because the bug is invisible on desktop where scroll position forgives the overlap.
Severity rationale
Medium because the obscured content is reachable via scroll once users figure out the offset, but CTA buttons and form submits near edges may be tapped through the overlay.
Remediation
For every fixed or sticky element, add matching padding to the adjacent content. Store the element's height as a CSS variable so one source controls both the height and the offset. Audit src/app/layout.tsx and any persistent UI chrome components.
:root { --header-height: 64px; }
main { padding-top: var(--header-height); }
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Mobile Responsiveness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-responsiveness·automated