Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Here's a more colorful version of this code, which also demonstrates it using child divs :) Commented Nov 21, 2021 at 23:05
  • I cant count the number of times in my career ive done funky ass floaty shit to avoid this problem - i had no idea this was even possible. Thank you. Commented Feb 15, 2023 at 11:26
  • Thank you so much for this answer. Have been going round in circles for the last 2 days trying to solve a bug :) Commented Mar 23, 2023 at 17:01
  • 1
    pointer-events:none; also works on ::before and ::after content -- which is what I needed. Commented May 2, 2023 at 18:21