0

i have a button which is in a <a> tag and i want to skew only the button and not the text

i know i can add <label>Add to cart</label> and un-skew it the opposite of the skewed amount but i don't have access to the html but only css.

<a role="button" id="add_to_cart" class="btn btn-primary" href="#">Add to Cart</a>

and css i did

.btn {
transform: skew(10deg);
}

is there any way i can un-skew the text inside this button without adding any other tag to the markup?

Ilir
  • 488
  • 5
  • 20
  • add a pseudo element and skew it or create a fancy background. All depend on the final result you want – Temani Afif Sep 30 '19 at 22:08
  • Possible duplicate of [CSS: Skew a buttons border, not the text](https://stackoverflow.com/questions/30768489/css-skew-a-buttons-border-not-the-text) – Rafael Herscovici Sep 30 '19 at 22:31

0 Answers0