I'm looking to create a grid with a downward arrow incorporated. Take a look at the image below:
The issue I'm facing is that because of the variable width caused by .col-xs-3
, the div's size varies. How can I adjust the width of the arrow (:after
element) so that it remains responsive?
This is My CSS:
.grid-arrow::after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 47px solid transparent;
border-bottom: 47px solid transparent;
border-left: 40px solid rgb(173, 173, 173);
position: absolute;
/* top: 50%; */
margin-top: -37px;
/* margin-left: 1px; */
left: 50%;
z-index: 3;
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
This is My HTML:
<div class="col-xs-3 advantage grid-arrow">
<div>
Some text
</div>
</div>