I’m desperately trying to finish up the Component Library solo project for Advanced React. I'm trying to center the image of the mobile testimonial component. Flex centers it with the left edge in the center. Left affects it, but I still can't figure out how to use it to center. Margin doesn't affect it at all. I feel I'm missing something I had already learned, but I'm flummoxed. Any help would be most appreciated.
https://scrimba.com/scrim/co38f42bca615ea7ddeace1ca?a=27319.0.3.L428_27
#center a position absolute img
4 messages · Page 1 of 1 (latest)
Hey @lament plume ,
The testimonialHeader div is in the way: it's between the absolute image and the relative parent. If you delete the header, you probably get the effect you need.
That's it! Thanks so much.
No worries!
Also, be mindful of width:20em; that's causing overflow. Always better to use min-width or a percentage-based value