Article preview component challenge using flexbox
Design comparison
Solution retrospective
This was a challenge for me because I tried to adapt to 3 different screens: iphone, ipad and desktop. I need some feedback because I think I took too much time in this one. I had some issues in positioning my popup message, and adjusting in code to different screens.
Community feedback
- @AgataLiberskaPosted almost 3 years ago
Hi Rodrigo! I remember having quite a few issues with this challenge too, it's quite a tricky one!
It's definitely a good idea to make sure your solutions are responsive from the very first challenge you attempt, so nice work here :)
I see there is an issue with the image in desktop view. The problem is this: your
.card
div is a flex container, and you've setalign-items: center
. This is why the height property on theimage-wrapper
isn't doing much. However, if you change align-items tostretch
it will fill up the full height of the div.The problem then will be that the image is going to be stretched out, but
object-fit: cover
on the image should fix it :)And when it comes to positioning your popup box - remember that you must set
position: relative
(or anything other than static) on a parent of the absolutely positioned element - otherwise it will be positioned in relation to the body which is hard to manage :) so if you add this to your.container
or the .card
, things should be easier!Hope this helps :)
Marked as helpful0@rodrigovnPosted almost 3 years ago@AgataLiberska thank you for the feedback, those remarks will certainly help me to upgrade my work
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord