Categories
CSS

How to disable all div content with CSS?

Spread the love

To disable all div content with CSS, we set the pointer-events property.

For instance, we write

#my-div {
  pointer-events: none;
}

to select the div with ID my-div and disable all mouse events on it by setting pointer-events to none.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

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