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

Responsive NFT Preview Card (HTML, CSS)

P
vcollins1 410

@vcollins1

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


What specific areas of your project would you like help with?

Any feedback would be helpful.

Community feedback

@DebabrataBanik

Posted

Great work on the design!

You might want to center the card in the viewport. For that you can first remove the margin-top: clamp(62px, 16.533vw, 152px); and also remove the margin-inline:auto from your card component. And add some css to the main tag:

main{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

Since the main tag contains the card, this CSS will center the card within the viewport without needing to manage margins manually.

Using clamp() for margin-top is useful when adjusting spacing based on viewport size. However, because the goal is to keep the card consistently centered, flexbox is a simpler and more effective solution.

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