To let clicks and other pointer input pass through a decorative overlay, set pointer-events: none on the overlay. The element remains visible, but the browser can target the interactive content underneath it instead.
Why a transparent overlay can still block clicks
Being visually transparent does not make an element inert. A layer positioned above a link, button, or scrollable area can still be the pointer-event target, intercepting clicks, dragging, or touch input. That was the problem behind the archived CSS-Tricks discussion: generated shadows looked right but blocked interaction with the content below. The thread is part of the CSS-Tricks forum archive, which is closed and viewable as an archive.
As an Amazon Associate I earn from qualifying purchases.
The fix is to change pointer targeting rather than the overlay’s appearance. A transparent background or opacity: 0 does not express that the layer should be ignored for pointer input.
Free tools Windows power users keep installed
One-click scans. No signup required.
Make a decorative layer click-through
Apply the rule to the visual-only overlay:
.decorative-overlay {
pointer-events: none;
}
With pointer-events: none, the overlay is generally ineligible as the pointer-event target; the event can go through it to an element underneath. MDN describes this behavior in its CSS pointer-events reference.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
This is appropriate for visual effects such as shadows or decorative layers that do not need to receive pointer input. Avoid putting controls in that layer unless you intentionally configure those descendants to receive pointer events.
If the overlay also contains interactive controls
A descendant can be made eligible for pointer targeting even when its parent has pointer-events: none. For example:
Rank #2
.overlay {
pointer-events: none;
}
.overlay button {
pointer-events: auto;
}
Use this pattern only when the overlay needs both decorative and interactive parts. An event targeted at an eligible descendant may still pass through the parent’s capture and bubbling phases, so listeners attached to the parent can still run. Keep that event flow in mind when handling clicks.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesCheck keyboard access separately
pointer-events: none controls pointer targeting; it does not automatically remove an element from sequential keyboard navigation. MDN notes that an element with this value may still receive focus through Tab navigation. If the overlay contains no interactive content, ensure its markup does not introduce focusable elements; if it contains controls, test both pointer and keyboard use.
Rank #3
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Browser support
MDN marks pointer-events widely available and reports browser availability since July 2015. That general statement does not guarantee identical support for every less-common value, so check detailed compatibility if your implementation depends on one. The MDN reference was last modified August 14, 2026.
Quick Recap
Best Value
Rank #4
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.




