I made a div triangle and it is placed perfectly. When I put it in I wanted it to be a different color than grey. So I went back to my class (css) and put background: red
and it changed the area around it red not the triangle itself. If you can help it would be appreciated!
.triangle {
width: 10px;
height: 0px;
border-left: 1030px solid transparent;
border-right: 1030px solid transparent;
border-bottom: 500px solid #555;
position: absolute;
left: -322px;
top: 160px;
z-index: -1;
background: red;
}
<div class="triangle"></div>