Put an image in div

HI everyone I realise this
No description
8 Replies
Pat66
Pat66OP10mo ago
now I want had an image in the center
<div class="central">
<img src="assets/love-dress-white-04.jpeg" class="pic" alt="belle dame">

</div>
<div class="central">
<img src="assets/love-dress-white-04.jpeg" class="pic" alt="belle dame">

</div>
my css:
.pic{
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
}
img{
max-width: 100%;
display: block;
}
.pic{
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
}
img{
max-width: 100%;
display: block;
}
the result :
Pat66
Pat66OP10mo ago
No description
Pat66
Pat66OP10mo ago
How can I resolve this problem ? thanks
Mannix
Mannix10mo ago
maybe try height: 100% instead of aspect-ratio: 1/1;
Pat66
Pat66OP10mo ago
thanks for your message but he don t change anything if I put
overflow:hidden;
overflow:hidden;
on the div you contain the image I get this
Pat66
Pat66OP10mo ago
No description
Pat66
Pat66OP10mo ago
don t see the head of the woman on picture
Mannix
Mannix10mo ago
object-position: top;
Want results from more Discord servers?
Add your server