sticky-and-fixed-elements

Resolve sticky versus fixed positioning for persistent UI elements.

Updated May 24, 2026
One-click install
npx skills add https://github.com/yonetim258852/ozgur-os --skill sticky-and-fixed-elements
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sticky-and-fixed-elements
Source: https://github.com/yonetim258852/ozgur-os/tree/main/.claude/skills/sticky-and-fixed-elements
Command: npx skills add https://github.com/yonetim258852/ozgur-os --skill sticky-and-fixed-elements

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sticky and fixed positioning helps keep important UI elements like headers and toolbars visible as the user scrolls, reducing cognitive load and improving navigation. Use this pattern deliberately to avoid visual clutter from too many fixed layers and to preserve content space for primary interactions.

Core Features & Use Cases

  • Distinguish between position: fixed (global UI) and position: sticky (section-scoped UI) to preserve context.
  • Apply a top header with fixed positioning for consistent access to navigation, while using sticky headers for long lists and tables.
  • Implement bottom toolbars on mobile with responsive padding and safe-area considerations.
  • Use explicit z-index tokens to avoid stacking conflicts and ensure predictable layering.

Quick Start

Define a top fixed header and a bottom sticky toolbar, applying appropriate padding to the page body to compensate for fixed elements.

Frequently Asked Questions about sticky-and-fixed-elements

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the difference between sticky and fixed positioning for web headers?

Sticky and fixed positioning differ by scope: fixed positioning removes elements from the document flow for global UI access, while sticky positioning keeps section-scoped headers visible only within their parent container during scroll. Use fixed for global navigation and sticky for table headers.

How do I keep a navigation header visible while scrolling down the page?

Keep a navigation header visible by applying position: fixed for consistent global access, or position: sticky if it only needs to persist within a specific section. Compensate for fixed elements by adding padding to the page body to prevent content overlap.

When should I use position sticky versus position fixed for mobile toolbars?

Use position: fixed for bottom toolbars on mobile to keep them permanently accessible, ensuring you apply responsive padding and safe-area considerations. Use sticky positioning when the toolbar context is limited to a specific scrolling section rather than the entire viewport.

How do I manage z-index stacking conflicts with multiple fixed UI layers?

Manage z-index stacking conflicts by using explicit z-index tokens to ensure predictable layering across persistent UI elements. This prevents visual clutter and stacking overlap when multiple fixed headers and sticky toolbars render simultaneously on the same page.

Why does my fixed header overlap the page content?

A fixed header overlaps page content because fixed positioning removes the element from the normal document flow. Apply appropriate padding to the page body to compensate for the fixed header height and push the primary content back into the visible viewport area.