Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a Playwright screenshot stops at the viewport, enable full-page capture. If the sticky header overlaps content or appears in the wrong place, separately decide whether to keep it, hide it, or temporarily change its positioning with the screenshot-time style option. These solve different problems: fullPage changes how much of the page is captured; CSS controls how the header looks in that capture.

First identify what is being cut off

Playwright’s ordinary page screenshot captures the visible viewport by default. Its fullPage option defaults to false. A full-page screenshot captures the full scrollable page; as the Playwright Screenshots documentation puts it, it is “as if you had a very tall screen and the page could fit it entirely.”

  • The image ends at roughly the viewport height: enable full-page capture.
  • The image is full length, but the sticky header covers content or sits awkwardly: choose whether the header should remain, be repositioned, or be hidden, then adjust its capture-time styling.
  • You need only the header or one defined part of the page: use an element screenshot or a clip rectangle instead of capturing the whole page.

Full-page capture does not decide how a sticky header should look. Treat capture extent and header layout as separate settings.

Capture the full scrollable page

Set fullPage: true on the page screenshot call in JavaScript, or full_page=True in Python.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

JavaScript

await page.screenshot({ path: 'page.png', fullPage: true });

Python

await page.screenshot(path='page.png', full_page=True)

Use this when the intended output is the entire scrollable document. It will not, by itself, remove a header, put it into normal document flow, or guarantee that it will not cover other content. Inspect the resulting image to confirm both its length and the header’s appearance.

Choose how the sticky header should appear

Playwright’s screenshot style option applies a stylesheet during capture. The documented mechanism can change element properties or hide dynamic elements; it is not a dedicated sticky-header switch, and the API documentation does not guarantee how a specific site’s CSS will behave under an override.

Keep the header but stop it sticking over content

If the desired image should show the header in document flow, try a narrowly targeted rule. Replace .site-header with the selector used by the page:

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
await page.screenshot({
  path: 'page.png',
  fullPage: true,
  style: '.site-header { position: static !important; }',
});

This is an application of Playwright’s stylesheet option, not a prescribed or guaranteed sticky-header fix. Changing positioning can affect layout, so review the output and adjust the selector or rule if the page shifts unexpectedly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Hide the header in the image

If the header should not appear at all, try a targeted hide rule instead:

await page.screenshot({
  path: 'page.png',
  fullPage: true,
  style: '.site-header { display: none !important; }',
});

Use the actual header selector and confirm the image. Hiding a header can also change the page layout; it is appropriate only when the desired screenshot should omit that element.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Capture just an element or a region

For a component-only image, take a locator screenshot. For a precise rectangular region, use the page screenshot’s clip option with the intended x/y origin and width and height. These options address framing, not full-document capture.

Screenshot one element

await page.locator('.site-header').screenshot({ path: 'header.png' });

Screenshot a defined rectangle

await page.screenshot({
  path: 'region.png',
  clip: { x: 0, y: 0, width: 1200, height: 400 },
});

Change the rectangle to match the intended page coordinates and dimensions. The page screenshot API documents the screenshot options, including clipping and page capture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Make captures consistent when the header moves

If repeated screenshots catch different header states because of a transition or animation, control animation behavior or suppress the relevant motion with a narrow screenshot-time CSS rule. The screenshot API’s animation handling fast-forwards finite animations so transitionend fires and cancels infinite animations to their initial state during capture; animations resume afterward. This can improve repeatability, but it does not correct an incorrectly sized clip or a consistently wrong layout.

For visual regression tests, Playwright Test’s toHaveScreenshot() creates a reference on first execution and compares later runs. Its screenshot style support can filter dynamic or volatile elements. Keep the viewport and page state consistent between runs, and inspect a baseline before updating it. Styling and snapshot comparison help control variation; neither guarantees a correct sticky-header layout. See the Playwright visual comparisons documentation.

Account for nested scroll areas

A full-page screenshot concerns the page’s scrollable document. The documented behavior does not establish that it expands every nested scroll container. If content inside an independently scrolling panel is missing, treat that container separately: capture the container as an element, or set its scroll position as part of your page setup and verify the result. Do not assume fullPage: true will turn every nested panel into a fully expanded image.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Troubleshoot the result

Symptom Likely cause What to try
Image ends at viewport height The page screenshot used its default viewport capture. Set fullPage: true (JavaScript) or full_page=True (Python) on the page screenshot call.
Header covers content or appears in an unwanted position Full-page capture changed capture extent, not the header’s CSS behavior. Use a narrowly scoped style override to reposition or hide the header, then inspect the rendered image.
Only the header or a fixed region is wanted A whole-page screenshot is broader than the required output. Use a locator screenshot for an element or clip for a rectangle.
Header looks different between captures A transition, animation, or changing page state may be affecting capture timing. Control animation handling or apply a targeted rule to the relevant motion; keep page state consistent.
Content in a nested panel is missing The panel may scroll independently from the page document. Capture the container or control its scroll position separately; verify that the desired content appears.
CSS override has no effect or shifts the page The selector may not match the header, or changing its positioning may alter layout. Check the page’s actual selector and test the resulting image. The stylesheet mechanism does not guarantee a particular page’s rendering.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a screenshot returned by one API request, ScreenshotNeo accepts a URL and returns an image or PDF. Its screenshot-time cleanup accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses include X-Page-Verdict and X-Billed headers. Its MCP server offers screenshot tools for AI agents, including Claude, Cursor, and other MCP clients.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a WebP screenshot, set an API key and run:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month—no card required.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.