Disable a link using css

The answer is already in the comments of the question. For more visibility, I am copying this to here:


<a href="link.html" class="active">Link</a>

.active {
   pointer-events: none;
   cursor: default;


CSS can only be used to change the style of something. The best you could probably do with pure CSS is to hide the link altogether.

What you really need is some javascript. Here’s how you’d do what you want using the jQuery library.

$('a.current-page').click(function() { return false; });

Leave a comment