I'm trying to disable a specific link and apply cursor style but this CSS command cursor: text;
won't effect. The cursor is always default. I'm using latest Firefox version.
CSS:
pointer-events: none !important;
cursor: text;
color: Blue;
Using pointer-events: none
will disable all mouse interactions with that element. If you wanted to change the cursor
property, you would have to apply the changes to the parent element. You could wrap the link with an element and add the cursor
property to it.
HTML
<span class="wrapper">
<a href="#">Some Link</a>
</span>
CSS
.wrapper {
position: relative;
cursor: text; /* This is used */
}
.wrapper a {
pointer-events: none;
}
There are a few browser inconsistencies, though. To make this work in IE11, it seems like you need a pseudo element. The pseudo element also allows you to select the text in FF. Oddly enough, you can select the text in Chrome without it.
.wrapper:after {
content: '';
position: absolute;
width: 100%; height: 100%;
top: 0; left: 0;
}