In order to display large images within a specified space, I need to use scrollbars to accommodate their size. Below are the two code examples that demonstrate this:
<div style="overflow: auto; margin: auto; margin-bottom: 1em;">
<img src="">
</div>
<div style="width: 500px; height: 500px; overflow: auto; margin: auto; margin-bottom: 1em;">
<img src="">
</div>
However, my goal is to create an outer division that serves as a picture viewer for full-size images with scrollbars. Here are the specific requirements for achieving this:
The horizontal space of the outer division should adapt to the viewer's monitor size, while the height will adjust automatically but not fill all available vertical space due to multiple viewers stacked vertically.
Given that the images inserted will usually exceed the available space, scrollbars are necessary for navigation.
It is important that the images do not get resized to fit the outer division or vice versa.
This solution must be achieved using only CSS and HTML without any external scripts or active content.
Due to image insertion being done through a loop, pixel sizes cannot be hard-coded as the application lacks the capability to provide such information.