Design comparison
Solution retrospective
I couldn't implement these features:
- Cut image and position for desktop screen
- Create a Tooltip (I used a generator but I decided to remove it)
- Change the icon color and container if it was clicked
I think these feature are basic for frontend developer but I'm improving my skills. Thanks for the tips.
Community feedback
- @mattstuddertPosted over 4 years ago
Hey Alfonso, nice work on this challenge! Here are some answers to your questions:
- For the desktop image, you could add
object-fit: cover;
andobject-position: center left;
to theimg
element. Because you've set aheight
andwidth
on the element, this will ensure the image maintains its aspect ratio (doesn't get squashed) and is anchored to the left of the image. You can then reduce thewidth
of the.card__picture
element and you'll see that it will crop the image to get it looking like the design. - For the tooltip in this design, I would just create an element with rounded corners. I would then use a
::before
pseudo-element to create a triangle and useposition: absolute;
to stick it to the bottom. You can use a CSS Triangle Generator to create the triangle code easily. - You could add/remove an
.active
class to the icon when it's clicked to show its current state using JS.
I hope these tips help. If you've got any more questions please feel free to ask! π
1@alfonsovgsPosted over 4 years ago@mattstuddert Thanks Matt π
I'm going to try these tips. ππ»
0@mattstuddertPosted over 4 years ago@alfonsovgs you're welcome! Let me know how it goes π
0@alfonsovgsPosted over 4 years ago@mattstuddert Hello Matt, I just finished the fix of the position for the image, I followed your tips. I'm going to continue with the Tooltip I still have no idea yet but I will try it.
Thanks a lot π
0@mattstuddertPosted over 4 years ago@alfonsovgs no problem! Good luck with the tooltip. Are you in the Slack community? That's the best place to get help if you get stuck on it π
0 - For the desktop image, you could add
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