I've encountered an issue while trying to create a div with a scrollbar that only appears when the elements within it don't fit the default area.
<div style="overflow-y: auto; height: 36px;">
<img src="." width="36" height="36" />
</div>
Despite the img and the div theoretically being the same height, there is some padding at the bottom of the div causing the scrollbar to always be displayed. This issue persists in both Firefox and Chrome, ruling out a browser bug as the cause.
What could be causing this unexpected behavior?