+ 19
Help!!!!! Codepen
So i need to center the image relative to the parent and everything I've tried isn't working. https://codepen.io/Queen-of-Hearts/pen/bJgxaV
5 ответов
+ 6
#img-div{
position:relative;
text-align: center;
width: 100px;
margin: auto;
}
You need to give attributes to the parent div including text-align center to make it work for the image
+ 18
const InvBoy = me; and that will also allow me to keep everything else
+ 16
Jay. It worked! Thank you so much ☺☺
+ 7
Use that:
#img-div {
display: flex;
flex-direction: column;
align-items: center;
}
+ 5
No problem 😊😊