I need to create grid with a down arrow. See the image below:
The problem is that the div has a variable width because of .col-xs-3
. How can I give the arrow (:after
element) the appropriate width so that it will still be responsive?
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);
}
My HTML:
<div class="col-xs-3 advantage grid-arrow">
<div>
Some text
</div>
</div>