Jump to content

Notched corners for buttons

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

Hi!

I'm wanting to create notched buttons like the button below.

I found one other thread about this, but I'm having trouble getting it to work correctly. 

I've had success with the below code showing correctly, but can't get the percentages right to make my desired shape:


.sqs-block-button-element  {

div {
  position: relative;
  width: 200px;
  height: 80px;
  overflow: hidden;
  background-color: #522d5b;
  clip-path: polygon(
    0 20%,
    10% 0,
    90% 0,
    100% 20%,
    100% 80%,
    90% 100%,
    10% 100%,
    0% 80%
  )
}

Thank you VERY much!


image.png.6ac6a98c44020dc458883e98e4190b03.png

Edited by CatCat
additional info
  • CatCat changed the title to Notched corners for buttons
  • Replies 4
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
Posted

Use some code like this

div.button-block a {
    position: relative;
    width: 200px;
    height: 80px;
    overflow: hidden;
    background-color: #522d5b !important;
    clip-path: polygon(
    0 20%,
    10% 0,
    90% 0,
    100% 20%,
    100% 80%,
    90% 100%,
    10% 100%,
    0% 80%
  ) !important;
    color: #fff !important;
    border-radius: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

image.png.41ee62da09c28f04caec34e8f38f08a8.png

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!)

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.