Why does display: inline-block
not work properly for <input type="file">
?
I would like the width of the element to be as wide as the content it's made of (button + text). But there's always some free space at the end of the text.
Why? And can this be fixed?
input[type="file"] {
display: inline-block;
min-width: auto;
width: auto;
background-color: lightgray;
}
<input type="file">
Screenshot: https://ibb.co/pWWdQ0y