I have a text field (input type="text") and a select list. The text field is wider than the select list. They are both in separate rows of a flex box. How can I make the text field the same width as the select list using pure css (no javascript)?
Looks something like this:
<div style="display: flex; flex-direction: column">
<input type="text">
<select>
<option>Tiny</option>
</select>
</div>
What happens is that the select list grows to the size of the text input (its default size as specified by the browser) rather than the input shrinking to the size of the list.
I apologize if this has been asked before (if so, a link would be appreciated) but so far, I can't find anything that addresses this obvious issue.