General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
5
Guidelines for positioning elements with banner awareness
Sign in to like and favorite skills
description: Guidelines for positioning elements with banner awareness globs:
When positioning elements with
sticky, fixed, or absolute that have a global reference point (like top-0), always use top-banner-offset instead of top-0.
The application can display system banners (payment issues, maintenance notices, etc.) that push content down. Using
top-banner-offset ensures your positioned elements appear below the banner rather than being covered by it.
Bad:
<div className="fixed top-0 left-0 right-0">...</div> <div className="sticky top-0">...</div> <div className="absolute top-0">...</div> <div className="pt-0">...</div>
Good:
<div className="fixed top-banner-offset left-0 right-0">...</div> <div className="sticky top-banner-offset">...</div> <div className="absolute top-banner-offset">...</div> <div className="pt-banner-offset">...</div>
h-screen-with-banner / min-h-screen-with-banner - Use these for full-height containers that should account for banner spacept-banner-offset - Use for padding-top to offset content below the banner--banner-height and --banner-offset defined in web/src/styles/globals.css--banner-height using ResizeObserver to track their actual rendered height, ensuring accuracy across all screen sizestop-banner-offset