A <span>
knows what horizontal size to be without being told. It's horizontal size is no greater than its content.
I'm trying to figure out the CSS to make an <input type='text'>
automatically size itself horizontally according to the length of its value
, like a <span>
would with its innerText
.
In other words, without specifying a CSS width:
or size
attribute on the <input>
.
I can't figure out how to do this. Any ideas?