October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

How to Make a Decorative CSS Overlay Click-Through

A transparent overlay can still intercept pointer input. Set pointer-events: none on a decorative layer to let clicks reach the content underneath.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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

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
Sale
HTML and CSS: Design and Build Websites
  • 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:

.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.

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

Check 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
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.