I want to create a triangle below the center of each li
element but not the last one.
html
<ul class="steps-ul">
<li> Step 1: Hardware Mounting </li>
<li> Step 2: Hardware Connection </li>
<li> Step 3: Devices Connection </li>
<li> Step 4: Initial Test </li>
</ul>
css
.steps-ul {
list-style-type: none;
width: 500px;
text-align: center;
}
.steps-ul li:nth-child(odd) {
background-color:#efefef;
}
.steps-ul li:nth-child(odd)::after {
border-top: 20px solid #efefef;
}
.steps-ul li {
margin: 20px;
padding: 10px;
font-size: 1.5em;
background-color:#d7d7d7;
}
.steps-ul li::after {
position: absolute;
left: 270px;
margin-top: 30px;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #d7d7d7;
}
Heres a screenshot of what i would like to accomplish
I attempted using the ::after
psuedo element within css but no results.