<div id='div-1' style='background:blue; height:100%'>
<input id='input-1' type='range' style='height:100%; margin:0; padding: 0; border: 0'/>
</div>
<div id='div-2' style='background:red; height:fit-content; fit-content'>
<input id='input-2' type='range' style='margin:0; padding: 0; border: 0'/>
</div>
In both cases, the div is taller than the input by 2.5px (Firefox) to 3px (Chrome), no matter what I do (aside from explicitly setting the size of both). Why does input seem to have some secret unchangeable padding that I cannot control (across all browsers, but not the same amount across all browsers)?
I'm trying to ensure that the div is the exact same size as the input, yet no matter what I do I cannot get them to be sized the same without doing some sketchy hard-coding of values (in a very browser-dependent fashion).
I have tried an assortment of "reset" tricks to try to get the input element to either fit its parent or for the parent to fit the input, but there always is some extra secret padding/margin below the input.