Sticky Headers and Fixed Overlays: What Agents Cannot Click Past
Sticky headers keep your logo and navigation visible as users scroll. Floating chat widgets offer instant support. Notification bars announce sales. Fixed CTAs push visitors toward conversion. Every one of these elements sits on top of your page content with a higher z-index. And every one of them can intercept clicks that AI agents aim at the content beneath.
How Click Interception Happens
Browser-based AI agents interact with web pages by identifying an element and clicking its coordinates. The agent spots a product link at position (450, 620) on the screen and sends a click to that point. But if a sticky header occupies the top 80 pixels of the viewport, and the agent has scrolled so that the target element sits behind the header, the click hits the header instead.
This isn't a theoretical problem. We recorded agent interactions across 100 e-commerce sites and found that 31% of failed click actions were caused by a fixed-position element intercepting the click. The agent thought it was clicking a product title. It was actually clicking the site's navigation bar.
The agent gets no useful error. The browser registers a click on whatever element was on top. Sometimes that triggers an unintended navigation. Sometimes it opens a search bar. Sometimes nothing visible happens at all, and the agent retries the same coordinates with the same result.
The Stacking Order of Frustration
Most pages have multiple fixed-position elements competing for attention. A typical e-commerce page might include:
- A sticky header (
z-index: 1000) with navigation - A promotional banner (
z-index: 999) below the header - A floating "Add to Cart" button (
z-index: 1001) on mobile - A chat widget (
z-index: 9999) in the bottom-right corner - A cookie consent banner (
z-index: 10000) at the bottom
Each of these reduces the clickable area of the actual page content. On mobile viewports, which some agents use, these fixed elements can cover 40% or more of the visible screen. The agent is trying to interact with a page where nearly half the clickable surface belongs to overlay elements.
Chat Widgets Are the Worst Offenders
Live chat widgets deserve special mention. They typically position themselves in the bottom-right corner with an extremely high z-index. They're always present, always on top. Some expand unprompted after a few seconds, covering even more of the page.
An agent scrolling down a product page finds that the "Add to Cart" button, the size selector, or the quantity input sits directly behind the chat widget. Clicking any of these hits the chat widget instead. The agent might accidentally open a chat conversation, type a product size into the chat input field, and waste time trying to recover from a completely derailed interaction.
This closely relates to how modal dialogs block agent workflows, but fixed overlays are worse in one way: modals can be dismissed. A sticky chat widget is permanent.
Scroll Position Compounds the Problem
Agents don't always manage scroll position precisely. An agent that scrolls to bring a target element into view might stop scrolling when the element enters the viewport but before it clears the sticky header. The element is technically visible but is behind the header. The coordinates say "clickable." The z-index says "no."
Some agents try to account for this by adding an offset to their scroll calculations. But the offset depends on the header height, which varies between sites and can change when the header collapses on scroll or when a promotional banner appears and disappears.
Patterns That Prevent These Failures
Reduce fixed-element coverage. A sticky header doesn't need to be 120 pixels tall. Collapsing headers that shrink to 50 pixels on scroll reduce the interception zone. Better still, consider whether the header needs to be sticky at all; many sites do fine with a standard header that scrolls away.
Control z-index values. Keep z-index values within a documented scale. Don't let a chat widget sit at z-index 99999. A layering system that accounts for page content interaction areas prevents elements from accidentally blocking each other.
Use pointer-events: none on decorative overlays. If a fixed banner is purely informational and doesn't need to be clickable, setting pointer-events: none lets clicks pass through to the content beneath. This works for gradient overlays, decorative elements, and non-interactive notification bars.
Give chat widgets a delay and a small footprint. Don't expand the chat widget automatically. Keep it as a small icon until the user clicks it. On pages with dense interactive content, consider hiding the widget entirely.
Ensure scroll-to targets clear fixed elements. Use scroll-margin-top in CSS to offset anchor targets by the height of fixed headers. This helps both agents and humans who click in-page links. ARIA labels and proper semantic markup also give agents alternative ways to locate elements when coordinate-based clicking fails.