I would like to make my div
have a pointy angle but I am not sure of what is the best way to do it.
.top-div {
width: 310px;
height: 25px;
background-color: #A52432;
}
<div class="top-div"></div>
For this kind of effect you could use CSS and make a clip-path
like this:
.top-div {
width: 310px;
height: 25px;
background-color: #A52432;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%);
}
<div class="top-div"></div>
You can do it with a simple linear-gradient()
which has greater support than clip-path:
.top-div {
width: 310px;
height: 25px;
background: linear-gradient(45deg, transparent 10%, #A52432 10.01%);
}
<div class="top-div"></div>