How to disable the link using CSS - Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial

How to disable the link using CSS

Introduction: In this article today I am going to explain how to disable the link using CSS

Description:
We can disable the active links using pointer events in css.
I create a class .not-active to disable the link:

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

After that define the class for anchor tag
<a href="http://articlemirror.in" class="not-active">Articlemirror</a>

Example:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
        <style>
.not-active
{
pointer-events: none;
cursor: default;
}
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <a href="http://articlemirror.in" class="not-active">Articlemirror</a>
    </div>
    </form>
</body>

</html>


What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.

Share this

Share on FacebookTweet on TwitterPlus on Google+


EmoticonEmoticon