You can see there’s a gap at the point where the sides need to be flush together at the tip of the arrow. Can someone tell me how to do that? I’ve played with the numbers of right
and bottom
on the :before
and :after
selectors so many times. Sometimes I’ll get them to fit together properly only to see that the rectangle is peeking out of the sides.
https://codepen.io/lepros/pen/ExXXgRL
#square {
background-color: blue;
width: 100px;
height: 200px;
margin: auto;
margin-top: 50px;
position: relative;
}
#square:after {
content: "";
display: inline-block;
border-radius: 4px;
width: 150px;
height: 70px;
background-color: white;
transform: rotate(45deg);
position: absolute;
right: 10px;
bottom: 0px;
}
#square:before {
content: "";
display: inline-block;
border-radius: 4px;
width: 150px;
height: 70px;
background-color: white;
transform: rotate(-45deg);
position: absolute;
right: -60px;
bottom: 0px
}