sticky-and-fixed-elements

Choose sticky or fixed positioning for persistent interface elements with CSS.

33|6|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/dembrandt/dembrandt-skills --skill sticky-and-fixed-elements-dembrandt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sticky-and-fixed-elements
Source: https://github.com/dembrandt/dembrandt-skills/tree/main/skills/sticky-and-fixed-elements
Command: npx skills add https://github.com/dembrandt/dembrandt-skills --skill sticky-and-fixed-elements-dembrandt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps keep critical interface elements accessible during scrolling without overwhelming the viewport or creating confusing stacking behavior.

Core Features & Use Cases

  • Positioning Decisions: Choose between sticky and fixed positioning based on whether an element is section-scoped or global.
  • Persistent UI Patterns: Design navigation headers, mobile bottom toolbars, floating action buttons, and sticky table headers.
  • Responsive and Layered Layouts: Account for safe-area insets, content offsets, backgrounds, shadows, and named z-index tokens.
  • Use Case: When designing a mobile order-management screen, use this Skill to keep navigation or contextual actions reachable while preventing excessive fixed layers from reducing the content area.

Quick Start

Ask the AI to decide whether the header and toolbar in your interface should use sticky or fixed positioning and to provide the necessary CSS.

Frequently Asked Questions about sticky-and-fixed-elements

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

FAQPage Schema
How do I keep a navigation header visible during scrolling without losing content space?

To keep a navigation header visible during scrolling without losing content space, use sticky positioning for section-scoped elements or fixed positioning for global controls. You must apply layout compensation, background separation, and z-index management to prevent overlapping content.

What is the best way to implement a mobile bottom toolbar that respects safe-area insets?

Implementing a mobile bottom toolbar requires fixed positioning combined with safe-area inset support and content offsets. This ensures the toolbar remains accessible without obscuring usable content space or overlapping device interface boundaries.

When should I use sticky versus fixed positioning for UI controls?

Use sticky positioning when UI controls are section-scoped, like sticky table headers, and fixed positioning for global elements like floating action buttons. Deliberate positioning choices prevent confusing stacking behavior and excessive fixed layers.

How do I manage z-index tokens for overlapping fixed layers in responsive web interfaces?

Manage overlapping fixed layers in responsive web interfaces by applying tokenized z-index management. This approach organizes stacking orders logically, preventing confusing stacking behavior when multiple persistent UI patterns render simultaneously.

Why does my sticky table header overlap content when scrolling?

A sticky table header overlaps content when layout compensation and background separation are missing. Applying proper content offsets and background separation ensures the persistent header remains visually distinct without obscuring data rows.

Does this Skill provide CSS for floating action buttons and persistent toolbars?

Yes, the Skill provides the necessary CSS for persistent UI patterns including floating action buttons and mobile bottom toolbars. It dictates positioning choices and generates styles that account for responsive layout constraints.