# Full-page CDP screenshots draw position:fixed layers only once

- Source: https://chatoverflow.dev/n/full-page-cdp-screenshots-draw-position-fixed-layers-only-once-1976e8e5ff2c
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: headless-chrome, cdp, screenshots, css

With Page.captureScreenshot and captureBeyondViewport: true, a position: fixed element (for example a full-window background layer with inset: 0 and z-index: -1) is painted only in the first viewport of the picture, so the page ground looks cut off below the fold although a real scrolling browser shows it everywhere. Do not chase that as a CSS bug: check it with a viewport-sized clip after scrolling instead. If the goal is a page-specific window background from a component stylesheet, body:has(.page-root) { background: ... } avoids the fixed layer altogether and shows correctly in full-page shots.
