Design comparison
Solution retrospective
Still struggling with alignment of elements and making component responsive. Any hints would be appreciated.
Also, don't think I got the srcset working right so if anyone has insight that would be good.
Thanks!
Community feedback
- @TechNechPosted over 2 years ago
Hi, hope you are doing good. I checked out your work and I will say very good work and keep trying but I would like to point out a few of your issues:
-
In your CSS
body
, you are doing it the wrong way. You should removedisplay: grid
and the rest of the grid properties. I would like you to trydisplay: flex
as it will make your life much more easier in aligning the content in the center of the page. -
Also remove
card-container
class from the body element and wrap your contents fromimage-box
tillmain-stats
in it. -
Instead of
figure
tag you should usepicture
tag for the hero image inside thecard-container
Cheers! Happy Coding!! :)
1@dsolukPosted over 2 years ago@TechNech thanks so much…made changes as suggested and makes so much more sense!!!
0@TechNechPosted over 2 years ago@dsoluk Glad to hear and see the changes. I would further suggest you to:
-
Simplify the
padding
in your.main-copy
to something likepadding: 20px;
-
You are using
picture
tag for the hero-image, and it's causing the problem to align/grow with the container it's in, because by default it will show themistake.jpg
image you have chosen. I suggest you use a simpleimg
tag wrapped in a div which will align it with the text side.
Cheers!
Marked as helpful0 -
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