+ 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

10th Apr 2019, 12:17 AM
QueenOfHearts [Inactive]
QueenOfHearts [Inactive] - avatar
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
10th Apr 2019, 12:28 AM
Jay
Jay - avatar
+ 18
const InvBoy = me; and that will also allow me to keep everything else
10th Apr 2019, 12:27 AM
QueenOfHearts [Inactive]
QueenOfHearts [Inactive] - avatar
+ 16
Jay. It worked! Thank you so much ☺☺
10th Apr 2019, 12:45 AM
QueenOfHearts [Inactive]
QueenOfHearts [Inactive] - avatar
+ 7
Use that: #img-div { display: flex; flex-direction: column; align-items: center; }
10th Apr 2019, 12:26 AM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar
+ 5
No problem 😊😊
10th Apr 2019, 12:46 AM
Jay
Jay - avatar