@A-amon
Posted
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 helpful
@nlorens
Posted
Hi @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 the h1
tag to my solutionπ
Regarding your first point, why you don't recommend using vh
for the height?
@A-amon
Posted
@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 π!
@nlorens
Posted
thank you @A-amon π
@A-amon
Posted
@nlorens Glad to help!