+ 1
display: flex on your #screen in CSS is your main problem when there are enough digits to overflow your div.
Obviously if the content in your div isn't wider than your div, there will be no overflow and therefore nothing to scroll through.
Remove your display: flex from #screen and it should behave the way you want.
Also, consider overflow-x: auto if you want the scrollbar to appear only when there is overflow.



