Categories
css

Disable a link

  • Scenario:
    disable button for next step in checkout when number of articles in cart exceeding limitation, the button for paypal is actually a link element.
<span class="link-wrapper isDisabled">
    <a href="url">Button Text</a>
</span>
.isDisabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.isDisabled > a {
  pointer-events: none;
}

Leave a comment