cheg• 380
@chegx
Posted
You can center img without positioning. Put the background image into main so it will act like background and won't interact with img. I commented your old code that you should remove.
main {
background-image: url(images/bg-pattern-card.svg);
background-repeat: repeat-x;
}
/* main .header {
background-image: url(images/bg-pattern-card.svg);
width: 100%;
height: 157px; */
main .body {
text-align: center;
/* position: relative; */
}
main .body img {
/* position: absolute; */
border-radius: 50%;
border: 5px solid white;
/* left: 50%;
top: -51px;
transform: translate(-50%); */
margin-top: 90px;
}
0