I have a list which are displayed with arrows using :after. It works ok, but sometimes more than one line of text is dynamically added inside each <li>
- how can I make the arrow stretch or just somehow follow the height of the <li>
?
See fiddle here. The first step has more text and so the arrow no longer fits the height.
* {
box-sizing: border-box;
}
#step {
padding: 0;
list-style-type: none;
font-family: arial;
font-size: 12px;
clear: both;
line-height: 1em;
margin: 0;
text-align: center;
display:table;
width: 100%;
}
#step li {
float: left;
padding: 10px 30px 10px 40px;
background: #333;
color: #fff;
position: relative;
width: 30%;
margin: 0 10px;
}
#step li:after {
content: '';
border-left: 16px solid #333;
border-top: 16px solid transparent;
border-bottom: 16px solid transparent;
position: absolute;
top: 0;
left: 100%;
z-index: 20;
}
<ul id="step">
<li>Step 1<br/>Step 1</li>
<li>Step 2</li>
<li>Step 3</li>
</ul>
Is there a dynamic solution to this issue?
Thanks in advance.