#content {
border: 2px blue solid;
width: 100%;
}
#gallery {
display:flex;
align-items: center;
justify-content: center;
}
#gallery > #large-photo {
width:70%;
margin: 20px 0px;
border: 3px red solid;
}
#small-photo {
position: absolute;
width:150px;
left:0px;
}
<div id="content">
<div id="gallery">
<img src="image/test.jpg" id="large-photo">
<img src="image/sale.jpg" id="small-photo">
</div>
</div>
Here is the code provided. The goal is to have the large image centered within the photo gallery and the small image set to absolute positioning relative to the large image.
How can this be achieved?
Currently, the small image is positioned relative to the main content div.