I have a ul element with many li. Some lines (li) are highlighted in yellow.
I want to add a triangle to the right border. This triangle should look like an arrow pointing to the text .
Something like that:

Fiddle
I tried to draw this triangle with the right frame, but this does not give me the correct shape.
<ul>
<li>not highlighted</li>
<li>not highlighted</li>
<li class="highlighted">HIGHLIGHTED</li>
<li>not highlighted</li>
</ul>
<style>
.highlighted {
border-right: 20px solid red;
}
</style>
Please indicate a notification that one li may contain more than one line, so you can change the height of the line. A fixed-height arrow (single row) is good enough.
Is it possible? If so, how?
source
share