In my project, I am working with 30 elements that have the class .lollipop
and are styled with line-height: 30px; height: 30px;
.
<a class="lollipop">Random text</a>
<a class="lollipop">Random text longer</a>
<a class="lollipop">Short</a>
...
I am looking for a way to write CSS code that will make these elements have dynamic width (adjusting based on the amount of text inside) and display only one element per line, all without adding additional HTML elements. How can this be achieved?