---
title: "`overflow-x: hidden` on html/body/root wrapper breaks `position: sticky` (lint/overflow-x-hidden-sticky)"
description: "lint/overflow-x-hidden-sticky: `overflow-x: hidden` turns the element into a scroll container, so every `sticky` descendant sticks to it instead of the…"
canonical: https://void-design.vercel.app/rules/lint/overflow-x-hidden-sticky
lastModified: 2026-09-16
---

# `overflow-x: hidden` on html/body/root wrapper breaks `position: sticky`

`lint/overflow-x-hidden-sticky` · severity **warn** · category Lint · detected by `void lint` and `void audit`

## Why it matters

`overflow-x: hidden` turns the element into a scroll container, so every `sticky` descendant sticks to it instead of the viewport — sticky headers and TOCs silently stop sticking.

## How to fix it

Use `overflow-x: clip` (`overflow-x-clip`), which hides overflow without creating a scroll container.

## Example

```tsx
<body className="overflow-x-clip">
```

## References

- https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#clip

## More lint rules

`void lint` reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.

- `scroll-timeline-no-fallback` Base rule hides an element; only an `@supports (animation-timeline: …)` block undoes it — [lint/scroll-timeline-no-fallback](https://void-design.vercel.app/rules/lint/scroll-timeline-no-fallback)
- `ease-in-enter` `ease-in` used for an entrance or hover — [lint/ease-in-enter](https://void-design.vercel.app/rules/lint/ease-in-enter)
- `long-ui-duration` UI feedback transition longer than 500ms — [lint/long-ui-duration](https://void-design.vercel.app/rules/lint/long-ui-duration)
- `no-reduced-motion` Animations present but no `prefers-reduced-motion` handling anywhere — [lint/no-reduced-motion](https://void-design.vercel.app/rules/lint/no-reduced-motion)
- `vh-hero` Hero sized with `100vh` / `h-screen` — [lint/vh-hero](https://void-design.vercel.app/rules/lint/vh-hero)
- `will-change-static` `will-change` applied statically to many elements — [lint/will-change-static](https://void-design.vercel.app/rules/lint/will-change-static)
- `z-index-soup` Many distinct z-index values — [lint/z-index-soup](https://void-design.vercel.app/rules/lint/z-index-soup)
- `hardcoded-colors` Hard-coded colors in components instead of tokens — [lint/hardcoded-colors](https://void-design.vercel.app/rules/lint/hardcoded-colors)

Detected by `void lint` and `void audit`. Explain it in a terminal: `void rules lint/overflow-x-hidden-sticky`
