NFT preview card component challenge on Frontend Mentor Using Html, Cs

Solution retrospective
I got some questions when doing the challenge:
-
Is it a good way to use <main> as the background element? My purpose is to apply CCS flex so as to center the card.
-
Flex gap
Does flex-gap exist? I found the property on the web but nothing happen when I applied it to my code and finally, I have to use margin.
- how to vertically center svg?
when I added svg (the eth icon and clock icon) to my codes, I found it is at the top-left of the box. I used flex align-items to center them. But is there another way to verically center svg?
- overlay color on image, is it possible(no need to add a div)?
to apply the hover effect of the main image, I added a div with overlay color. But is there any way that I no need to add a div but just do some css rules to the image?
- why can't the image fully fill the box?
There is a 1px gap at the bottom and I have to set the height to 99% to fix it.
-
Is it a good way to use <main> as the background element? My purpose is to apply CCS flex so as to center the card.
-
Flex gap
Does flex-gap exist? I found the property on the web but nothing happen when I applied it to my code and finally, I have to use margin.
- how to vertically center svg?
when I added svg (the eth icon and clock icon) to my codes, I found it is at the top-left of the box. I used flex align-items to center them. But is there another way to verically center svg?
- overlay color on image, is it possible(no need to add a div)?
to apply the hover effect of the main image, I added a div with overlay color. But is there any way that I no need to add a div but just do some css rules to the image?
- why can't the image fully fill the box?
There is a 1px gap at the bottom and I have to set the height to 99% to fix it.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Aaron Li's solution.
Join 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