I have the following HTML:
<li>
<a href="mylink">Some text</a>
</li>
I am trying to disable the link via CSS on the parent <li>
element but to no avail.
<li class="disabled">
<a href="mylink">Some text</a>
</li>
And the CSS I have tried:
li.disabled {
pointer-events: none;
cursor: default;
opacity: 0.6;
}
li.disabled:hover {
pointer-events: none;
cursor: default;
opacity: 0.6;
}
I have also tried:
li.disabled a {
pointer-events: none;
cursor: default;
opacity: 0.6;
}
li.disabled a:hover {
pointer-events: none;
cursor: default;
opacity: 0.6;
}