Categories
CSS

How to make an area unclickable with CSS?

Spread the love

Sometimes, we want to make an area unclickable with CSS.

In this article, we’ll look at how to make an area unclickable with CSS.

How to make an area unclickable with CSS?

To make an area unclickable with CSS, we set the pointer-events CSS property to none.

For instance, if we have a link:

<a href='https://example.com'>
  link
</a>

Then we can make it unclickable with:

a {
  pointer-events: none;
}

Conclusion

To make an area unclickable with CSS, we set the pointer-events CSS property 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 *