Jump to content

Notched corners for buttons

Recommended Posts

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
Link to comment
  • CatCat changed the title to Notched corners for buttons
  • Replies 3
  • Views 158
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment

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.