I'm trying to add an image inside a circle built with css. I think I could upload the image correctly but there's a problem with the visualization of the image as you can see below. I've also tried to export the image I want to use as the same size of the circle but either that solution is not working.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.grid {
display: flex;
flex-wrap: wrap;
max-width: 960px;
width: 90%;
margin: auto;
}
.cell {
flex-basis: 33.3%;
display: flex;
justify-content: center;
align-items: center;
}
.cell:before {
padding-bottom: 100%;
display: block;
content: '';
}
.circle {
border-radius: 50%;
width: 150px;
height: 150px;
margin: 0 auto 1em;
box-shadow: 0px 0px 15px 0px;
}
.circle img {
width: 100%;
height: auto;
position: relative;
top: 50%;
transform: translate(0%, -50%);
}
<div class="grid">
<div class="cell">
<div class="inner">
<div class="circle"><img src="{image2}"></div>
<div class="caption">
<h3>Chiara Bersani <br> Marta Montanini</h3>
</div>
</div>
</div>
The layout actually has 12 circles and each one has a different image inside so I can't do that using background-image in the css section (I've also tried that but not even that solution is working)