How to disable div element and everything inside with CSS?

Sometimes, we want to disable div element and everything inside with CSS.

In this article, we’ll look at to disable div element and everything inside with CSS.

How to disable div element and everything inside with CSS?

To disable div element and everything inside with CSS, we set the pointer-events CSS property of the div to none.

For instance, we write

div {
  pointer-events: none;
}

to disable pointer events on the div with pointer-events set to none with CSS.

Conclusion

To disable div element and everything inside with CSS, we set the pointer-events CSS property of the div to none.