Need help keeping my images from overflowing the <div class="display">
container and maintaining a square/box shape
It should work with flexbox.
Currently, the code displays 3 images with 1 extending outside the box, which is not the desired outcome.
.display {
min-width: 500px;
max-width: 500px;
}
.scenery {
display: flex;
flex-direction: column;
}
.scenery_1 {
display: flex;
}
.scenery_2 {
display: flex;
}
<div class="display">
<div class="scenery">
<div class="scenery_1">
<img src="https://s-media-cache-ak0.pinimg.com/736x/02/e1/52/02e1528600a592817fbfa1c67158c13f.jpg" alt="display">
<img src="https://s-media-cache-ak0.pinimg.com/736x/02/e1/52/02e1528600a592817fbfa1c67158c13f.jpg" alt="display">
</div>
<div class="scenery_2">
<img src="https://s-media-cache-ak0.pinimg.com/736x/02/e1/52/02e1528600a592817fbfa1c67158c13f.jpg" alt="display">
<img src="https://s-media-cache-ak0.pinimg.com/736x/02/e1/52/02e1528600a592817fbfa1c67158c13f.jpg" alt="display">
<img src="https://s-media-cache-ak0.pinimg.com/736x/02/e1/52/02e1528600a592817fbfa1c67158c13f.jpg" alt="display">
</div>
</div>
</div>