How to disable all div content with CSS?

Spread the love

Sometimes, we want to disable all div content with CSS.

In this article, we’ll look at how to disable all div content with CSS.

How to disable all div content with CSS?

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

For instance, we write

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

to disable clicks on the div with ID my-div using pointer-events: none;.

Conclusion

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

Leave a Reply

Your email address will not be published.