I am looking to replicate the tagging functionality found on StackOverflow when posting a new question.
In this case, spans are dynamically added using an input field located next to them.
Here is an example:
<div>
<div id="multiple-span">
<span>Item 1<span>
<span>Item 2<span>
...
<span>Item n<span>
</div>
<div id="input-auto-fit">
<input type="text">
</div>
</div>
Is there a way to achieve this using just CSS?
I have attempted using display:table-cell
for both the inner divs
, but the input
field is not properly auto-fitting within the outer div
.