Design comparison
Solution retrospective
Total newbie here! I am having trouble making it responsive, any advice/feedback is much appreciated. Also if there are ways to code the layout more efficiently? Any comment is welcomed :)
Community feedback
- @A-amonPosted about 3 years ago
Hello! Great effort~ π
Here are some suggestions( or things I think can be fixed)
- Remove the
height
setting from.card
. Instead, set the height for the image, either in px or other units. I don't recommend usingvh
orvw
for this height. π - Remove
top
setting from.card
. Then, set thebody
's height to100vh
. (The card is now at center for any size π₯³) - You are missing
h1
andh2
elements. Maybe put ah1
element containing the challenge's title like<h1> NFT card challenge </h1>
and hide it using a screen-reader only π class (You can check these out - Ref1, Ref2. Also, read this to find out about heading tags' usage. - To center vertically, the icon and text inside
.eth
and.time
respectively, you can give those two classes this:display:flex; align-items:center;
. - Instead of using
position:absolute; right:1.5em;
on.time
to align it to the right, maybe you can try outjustify-content:space-between;
on.feature
. π
Awesome work! π
Marked as helpful0@nlorensPosted almost 3 years agoHi @A-amon !
Thank you so much for your feedback! I really appreciate it. My code looks more clean now after using
display:flex
as you have suggested. And the result looks neater. I struggle with aligning items, as you can see from my code, I tend to code it too specificπ and it becomes less responsive. Happy to learn new ways to align/centering things!Wow I didn't know that
h1
is very important, so thank you for highlighting that! I need to spend some time to read the links that you shared and then I will also add theh1
tag to my solutionπRegarding your first point, why you don't recommend using
vh
for the height?0@A-amonPosted almost 3 years ago@nlorens It will surely get better over time! π About the
vh
for this image's height, it would be because different devices might have different heights so it would be hard to keep this image's appearance consistent on all of them if you use it. π€ This is just my opinion tho π!1 - Remove the
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