Wednesday, May 6, 2015

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>


No comments:

Post a Comment