3

I try to make a button with one corner shaved, I was searching around the web but could't find a method to create it like that.

enter image description here

The thing I tried is the following css code:

   #button {
  border-bottom: 100px solid red;
  border-left: 25px solid transparent;
  height: 0;
  width: 100px;
}

But as you can see, it does..:

enter image description here

Any help would be great

2

1 Answer 1

5

Have you consider using clip-path? You can try this

.path {
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%, 0 29%);
  width: 100px;
  height: 60px;
  background-color: tomato;
}
<div class="path"></div>

Sign up to request clarification or add additional context in comments.

1 Comment

Sorry for late answer, but this was the fix for me!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.