I am working on a design with an 800px wide div that contains side-by-side images - one photo and one map. The challenge I am facing is that the map, which is 300px in width and has intricate details, becomes unusable when resized for smaller screens. I want to prevent the map from resizing at all on smaller screens, while allowing the photo to resize indefinitely without causing the map to wrap around and appear below it.
I am wondering if it is possible to achieve this using just one container, rather than having separate containers for the photo and map. Here is the current code:
.container {
width: 800px;
max-width: 100%;
}
.photo {
float: left;
max-width: 100%;
height: auto;
}
.map {
float: right;
width: 300px;
height: 250px;
}
<div class="container">
<img class="photo" src="photo.jpg">
<img class="map" src="map.png">
</div>