NickHart Posted March 20 Share Posted March 20 I'm trying to create a parallelogram-shaped button (see codepen in link) on a Squarespace site for a client. I know that this is possible to do through pure HTML/CSS, as is demonstrated in the link. However, I'm wondering if I can do this by manipulating regular Squarespace buttons via CSS.. I've figured out half the problem (skewing the whole button), but now I'm trying to target the text within and counteract the skew so that the text is normal. This is tricky because unlike the codepen, the whole element is an anchor link, and there's no additional span or text element wrapping the text. I'm able to skew the button with the following code: .sqs-block-button { transform: skew(-20deg); } In the linked codepen, there is a span element inside the anchor element, which then has this applied to it: .skew-fix{ display:inline-block; transform: skew(20deg); } How can I apply those two lines of css to the text within the button, and keep the css on the button element the same? Or is there a better way to accomplish this? Link to comment
tuanphan Posted March 25 Share Posted March 25 Hi, I don't see Codepen link. Can you check again? I remember there is a similar thread in Circle Forum (you can also try searching solution there) Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment