-2
I’m trying to center the images using the: Justify-content: center; tried in many ways but I could not get someone can give a strength?
I want the images to be in the center of the screen with margin-left: 20px, but I’m not getting.
*{
margin: 0;
padding: 0;
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&display=swap');
.paidocontainjsjl {
display: flex;
flex-wrap: wrap;
background-color: antiquewhite;
padding-top: 90px;
padding-bottom: 90px;
font-family: 'Poppins', sans-serif;
}
#humcentrimmm {
position: absolute;
top: 30px;
left: 50%;
z-index: 1;
transform: translateX(-50%);
}
#humcentrimmm h1{
text-transform: uppercase;
font-weight: bold;
font-size: 37px;
}
.boxdaimgsds {
position: relative;
z-index: 10;
width: 200px;
margin: 0 auto;
}
.boxdaimgsds img {
width: 200px;
z-index: -99;
margin-top: 40px;
}
.boxtexto {
width: 200px;
position: absolute;
bottom: -20px;
margin-top: -100px;
background-color: salmon;
padding-top: 10px;
padding-bottom: 10px;
text-align: center;
color: #fff;
font-size: 23px;
font-weight: bold;
z-index: 888;
text-transform: uppercase;
}
.boxtexto::after {
content: "";
position: absolute;
left: 0;
bottom: 50px;
background-color: salmon;
clip-path: polygon(0 78%, 100% 93%, 100% 100%, 0% 100%);
width: 100%;
height: 100%;
}
@media (max-width:1087px) {
.boxdaimgsds {
margin-top: 50px;
}
#humcentrimmm {
top: 40px;
}
.boxdaimgsds img {
width: 200px;
z-index: -99;
margin-top: 0px;
}
}
<div class="paidocontainjsjl">
<div id="humcentrimmm">
<h1>Produtos</h1>
</div>
<div class="boxdaimgsds">
<img src="https://www.w3schools.com/howto/img_avatar.png" alt="">
<div class="boxtexto">Texto</div>
</div>
<div class="boxdaimgsds">
<img src="https://www.w3schools.com/howto/img_avatar.png" alt="">
<div class="boxtexto">Texto</div>
</div>
<div class="boxdaimgsds">
<img src="https://www.w3schools.com/howto/img_avatar.png" alt="">
<div class="boxtexto">Texto</div>
</div>
<div class="boxdaimgsds">
<img src="https://www.w3schools.com/howto/img_avatar.png" alt="">
<div class="boxtexto">Texto</div>
</div>
</div>
! Thank you worked.
– Milo JS