Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

NFT Preview Card Component using CSS Flexbox

#sass/scss
Nguyen Nguyenβ€’ 340

@jesuisbienbien

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any feedbacks are welcome. I have a few issues that I'd love to receive suggestions on:

  1. At the ethereum icon and days line (below the paragraph), I couldn't center horizontally the words and the icon images. Tried adding padding -bottom and margin-bottom and both didn't work.
  2. I used fixed height and width for this project but would like to learn how to use rem and em better. Any recommendations on good tutorials for this specific topic?
  3. Also, I think I'm using a lot of divs in this project, will that be a problem in the future, for more advanced projects?

Community feedback

Travolgi πŸ•β€’ 31,500

@denielden

Posted

Hi Nguyen, I took some time to look at your solution and you did a great job!

Also I have some tips for improving your code:

  • add main tag and wrap the card for Accessibility
  • You can add the effect :hover creating a div that appears on hover. I used tailwind but you can still see and understand which css properties you can use to do the same. Look here -> my solution
  • after try to add a little transition on the element with hover effect
  • use Flexbox to the div container for center image and span like this:
<div class="flex">
   <img src="images/icon-ethereum.svg" alt="ethereum icon image">
   <p class="eth-quantity"> 0.041 ETH</p>
</div>
  • guide for relative units of measurement -> read here

Overall you did well :)

Hope this help and happy coding!

Marked as helpful

1

Nguyen Nguyenβ€’ 340

@jesuisbienbien

Posted

@denielden thank you! I'd really appreciate your feedbacks and suggestions.

1
Md Raihan Alamβ€’ 520

@Md-Raihan-Alam

Posted

1-> You can use flex or grid for horizontally aligning anything. You can see freecodecamp tutorial = https://www.youtube.com/watch?v=tXIhdp5R7sc for flex box and kevin powell grid =https://www.youtube.com/watch?v=rg7Fvvl3taU. This should cover everything. You should subscribe kevin powell channel, he is consider as king of css by most of developer online. Here is channel=kevin powell, His channel is about everything of css.

2-> Kevin powell has also cover about rem and em. Here is the video=https://www.youtube.com/watch?v=_-aDOAMmDHI and another=https://www.youtube.com/watch?v=N5wpD9Ov_To

3-> No, I have been completing many projects and I also rely on div ( in my opinion). But you should not use unnecessary div

I hope they answered your questions

Marked as helpful

1

Nguyen Nguyenβ€’ 340

@jesuisbienbien

Posted

@Md-Raihan-Alam thank you so much for taking your time to reply to all my questions. They are very helpful. <3

0
Dev Rathoreβ€’ 2,600

@GitHub-dev12345

Posted

Congratulation Nice Work Keep it up πŸ˜‰πŸ‘

Used this code want your card in center position :

in body tag Used this CSS Code: body{ display : flex; justify-content: center; align-item: center; }

in Card Design CSS Code used this property: align-self: center;

used this CSS Property in your card to increase and decrease the size of card:

1.In Card design CSS Code Used this:

transform : scale(0.8); this property decrease the size of card. πŸ˜‰

large size for increase the number of scale & small size for decrease the number of scale

Marked as helpful

0

Nguyen Nguyenβ€’ 340

@jesuisbienbien

Posted

@GitHub-dev12345 Thank you! I'd appreciate it.

0
optimusprime202β€’ 1,220

@optimusprime202

Posted

Hey @jesuisbienbien, Now This is what I call a fine job.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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