Free tools Windows power users keep installed
One-click scans. No signup required.
html2canvas does not take a pixel-perfect screenshot of the browser tab. It rebuilds an image from the DOM and the style information it supports. A layer that appears on top in Chrome, Firefox, or Safari can therefore be painted behind another layer in the canvas. Fix the problem by isolating the overlap, checking stacking contexts and supported CSS, reasoning through html2canvas’s paint order, and applying a capture-only adjustment with onclone. If the output must match the browser’s actual pixels, use a native browser capture API or a headless-browser workflow instead.
Why is z-index not working in html2canvas?
A CSS z-index value is meaningful only inside the stacking context that contains the element. An element with z-index: 999999 can still appear below an element in a different ancestor context. html2canvas adds another constraint: it classifies DOM nodes and paints them itself rather than asking the browser for the already-composited tab image.
The project documentation describes CSS support as property-by-property and incomplete. Its FAQ puts the limitation plainly: “Every CSS property must be manually implemented to render correctly, so html2canvas will never have full CSS support.” Consequently, increasing a number is not a universal fix. The mismatch may come from an unsupported property, an unexpected stacking-context boundary, or the renderer’s handling of descendants.
Reproduce the mismatch with a minimal case
Start with only the two overlapping elements and the styles that affect them. This prevents unrelated transforms, opacity, filters, and positioned ancestors from hiding the real cause.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
- 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
<div id="stage">
<div class="panel">Panel</div>
<div class="badge">Badge should be on top</div>
</div>
<style>
#stage { position: relative; width: 420px; height: 220px; }
.panel { position: absolute; inset: 20px; z-index: 1; background: steelblue; }
.badge { position: absolute; top: 35px; left: 40px; z-index: 2; background: gold; }
</style>
<script>
html2canvas(document.querySelector('#stage')).then(canvas => {
document.body.appendChild(canvas);
});
</script>
Compare the live page and the generated canvas. Record which node is visually wrong, which ancestor establishes its stacking context, and whether the discrepancy occurs only after a transform, opacity, filter, or other effect is applied.
Inspect stacking contexts before changing z-index
Use browser developer tools to walk from each overlapping element to the root. Look for ancestors with properties that establish a new stacking context, including positioned elements with a non-auto z-index, transforms, opacity below 1, filters, isolation, and related compositing rules. Two descendants in different contexts cannot be reordered by changing their local numbers alone.
Questions to answer for both elements
- Are they positioned, and are their
z-indexvalues applied to the elements you think they are? - Do their nearest stacking-context ancestors differ?
- Does an ancestor clip the element with
overflowor establish a new containing block? - Are transforms, opacity, filters, or isolation creating an additional context?
- Is one node in normal in-flow content while the other is positioned?
As a diagnostic, temporarily remove transforms, opacity, filters, and ancestor z-index values. If the canvas then matches, restore the rules one at a time and identify the declaration that changes the result. Keep this test separate from the final design; it is meant to locate the boundary.
Understand html2canvas’s paint order
The renderer source organizes a stacking context into ordered phases. The implementation currently paints the context’s background and borders, then negative stack-level children, in-flow content and non-inline descendants, floats and inline-level descendants, positioned/opacity/transform descendants with auto or zero stack levels, and finally positive z-index stacking contexts in z-index order.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →This is a model for diagnosing where a node enters the renderer’s sequence, not a promise of browser pixel equivalence. The repository’s master source can change, and a browser may composite effects differently. If the element is classified into a different phase than you expect, a larger value may have no visible effect.
Rank #2
- 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
Negative values need special care
A negative stack level is painted before in-flow content in the renderer’s sequence. An element moved to z-index: -1 can consequently disappear behind its context’s background or other content. Use negative values only when that ordering is intentional, and test the canvas rather than inferring the result from the browser view.
Positive values are local, not global
Positive stack levels are ordered after the earlier phases, but only among contexts that are being compared at that level. A child with z-index: 100 cannot escape an ancestor context that is painted below a sibling context. Move the stacking-context boundary, not merely the child’s number, when that is the cause.
Check whether the CSS is supported
html2canvas implements CSS properties manually. The official FAQ asks users to prepare a reduced test case when a property is missing or incomplete. Check the project’s supported-features documentation and test the smallest possible page. Features that affect compositing or painting deserve particular suspicion.
- Replace an advanced effect with a plain positioned box and background. If ordering becomes correct, the effect may be unsupported or partially supported.
- Remove
transform,filter, opacity, clipping, and pseudo-element dependencies one at a time. - Make key geometry explicit with
position,top/left, width, height, and a background while debugging. - Verify that the element is present in the cloned document and is not hidden by a selector or a loading state.
Use onclone for a capture-only fix
The onclone option receives the cloned document that html2canvas is about to render. You can alter that clone without changing the live page seen by users. This is the safest place for a screenshot-specific stylesheet, a simplified effect, or a temporary stacking arrangement.
Example: move an overlay into a controlled capture layer
const target = document.querySelector('#stage');
html2canvas(target, {
onclone: (clonedDocument) => {
const clonedStage = clonedDocument.querySelector('#stage');
const clonedBadge = clonedDocument.querySelector('.badge');
if (!clonedStage || !clonedBadge) return;
clonedStage.style.position = 'relative';
clonedStage.style.isolation = 'isolate';
clonedBadge.style.position = 'absolute';
clonedBadge.style.zIndex = '10';
clonedBadge.style.transform = 'none';
clonedBadge.style.filter = 'none';
}
}).then(canvas => {
document.querySelector('#output').replaceChildren(canvas);
});
This does not make an unsupported feature supported. It gives the renderer a simpler, explicit arrangement for the capture. Keep the callback narrowly scoped: changing global selectors, dimensions, or content can create a different screenshot than intended.
Rank #3
- 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.
Example: inject a temporary stylesheet
html2canvas(document.querySelector('#stage'), {
onclone: (doc) => {
const style = doc.createElement('style');
style.textContent = `
#stage { isolation: isolate !important; }
#stage .background { position: absolute !important; z-index: 0 !important; }
#stage .foreground { position: absolute !important; z-index: 1 !important; }
#stage .problem-effect { transform: none !important; filter: none !important; }
`;
doc.head.appendChild(style);
}
});
Use !important only in this temporary stylesheet when existing author rules otherwise win. Remove each override after you have confirmed which one fixed the ordering, then keep the smallest working change.
When html2canvas is the wrong capture technology
If the requirement is “the exact pixels in the browser tab,” switch tools instead of endlessly tuning CSS. The html2canvas FAQ points browser-extension authors to the browser’s native screenshot API. For server-side capture, it names Puppeteer and Playwright, which drive a real (usually headless) browser and capture its rendered page.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors| Requirement | Approach | Why |
|---|---|---|
| Selective DOM rendering, with a canvas you can post-process | html2canvas | Convenient in-page reconstruction, but CSS support is incomplete and output can differ from the tab. |
| Extension screenshot of the current tab | Native browser tab-capture API | Captures the browser’s rendered tab rather than rebuilding it from DOM data. |
| Server-side screenshot of a URL | Puppeteer or Playwright | Drives a browser for full-page rendering and screenshot capture. |
| Managed API with cleanup, retries and formats | ScreenshotNeo | One request returns PNG, JPEG, WebP or PDF; it removes common consent UI before capture and reports billing status. |
Or skip the browser setup
For a URL screenshot, ScreenshotNeo provides a hosted endpoint and an MCP server for Claude, Cursor, and other MCP clients. The request below captures Stripe as WebP:
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 documentation for all options and response headers. It can load lazy images for full-page captures, target one CSS selector, emulate dark mode and 12 device presets, set any viewport and retina scale, generate PDFs with paper size, margins, orientation and page ranges, render HTML/CSS, run custom JavaScript, click an element, wait for a selector, delay or network idle, hide selectors, block ads/trackers/requests/resource types, send headers/cookies/user agents/Authorization, set timezone or geolocation, use transparent backgrounds, resize images, cache with your chosen TTL, create signed links, submit async jobs with signed webhooks, capture up to 100 URLs per call, expose usage data, and provide an OpenAPI specification. Parameter names used by other screenshot APIs also work.
Cookie banners, newsletter popups and chat widgets are removed before the shot. Bot checks, blank pages and failed loads are not billed, and response headers identify the page verdict and billing status. The MCP tools are take_screenshot, get_page_info and capture_pdf. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Troubleshooting checklist
The higher z-index has no effect
Check whether the elements are in different stacking contexts. Move the value to the ancestor context being compared, or use onclone to create a single isolated capture context.
Rank #4
- 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
The browser is correct but the canvas is wrong
Reduce the page, remove compositing effects, and verify CSS support. If a simplified version works, replace or flatten the unsupported effect for capture.
An element vanishes from the canvas
Confirm it exists in the cloned document, is not hidden by a selector, has non-zero dimensions, and is not clipped by an ancestor. Temporarily give it an opaque background and explicit size.
Only fonts or images differ
Wait until resources are ready before calling html2canvas, and verify that cross-origin resources are configured for canvas use. A resource failure can make the result look like a layering error even when the paint order is correct.
The fix changes the live page
Move all diagnostic styles into onclone. Do not mutate the original nodes before capture unless the visual change is intended for users.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Server capture is blank or times out
Use a browser-driven workflow or a managed API, wait for the page’s readiness condition, and inspect the returned status. For ScreenshotNeo, the X-Page-Verdict and X-Billed headers distinguish clean captures from bot checks, blank pages, timeouts, failed loads and cache hits.
Best Value
- 【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.
Performance, reliability and cost considerations
html2canvas runs in the page and must traverse and paint the selected DOM. Capture a smaller element when full-page output is unnecessary, avoid repeated captures during animation, and wait for stable layout before invoking it. Clone-only simplifications can reduce work as well as improve ordering.
Native and headless-browser captures use more browser infrastructure but are the appropriate trade-off for pixel fidelity. A hosted service can remove that setup and add waiting, blocking, caching and asynchronous jobs. ScreenshotNeo bills only clean shots; bot checks, blank pages, timeouts, failed loads and cache hits cost nothing. Its plans are Free (1,000 per month), Starter $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000; yearly billing gives two months free, and every feature is on every plan.
Decision guide
- Choose html2canvas when you need a browser-side, DOM-selective canvas and can accept that supported CSS determines the result.
- Choose a native extension API when you need the current tab’s actual rendering.
- Choose Puppeteer or Playwright when your server must drive a browser and retain control of the environment.
- Choose ScreenshotNeo when you want a URL-to-image or PDF endpoint, cleanup of consent and overlay UI, usage headers, bulk or asynchronous capture, or MCP tools for AI agents.
Frequently Asked Questions
Can I solve every html2canvas layering bug with a larger z-index?
No. z-index is scoped to stacking contexts, and html2canvas may not support or classify the CSS involved the same way as the browser.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Does onclone modify my production DOM?
No. It modifies the cloned document used for that capture. Keep the callback focused so the screenshot-only variant remains predictable.
Which tool should an extension use for an exact tab screenshot?
Use the browser’s native screenshot or tab-capture API, as recommended by the html2canvas FAQ.
Which hosted ScreenshotNeo tool is used for PDFs?
The MCP server exposes a tool named capture_pdf, while the HTTP endpoint also supports PDF output and PDF options.
The Bottom Line
First verify stacking contexts and supported CSS, then simplify the clone with onclone. If “correct” means the browser’s actual pixels rather than a DOM reconstruction, use native tab capture, Puppeteer, Playwright, or ScreenshotNeo.
Recommended Free Tools
Quick Recap
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.




