If I have
<div><input></input></div>
how can I make the width of both the input
and the containing div
automatically as wide as the text value currently presented. In particular, I want the box to grow and shrink when the user edits the input.
Can I do is in pure CSS? Do I have to listen for events and update the style? How? (Note: the font in this case is mono-spaced, so probably that makes it easier, although I'm interested in a general solution).