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

Zsollt88β€’ 120

@Zsollt88

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHello @Zsollt88, congratulations for your new solution!

Your component is perfect, but is not responsive yet, this is due the fixed width you've applied to the container.

The main difference between width and max-width is that the first property is fixed and the second is flexible, for example, a component with width: 340px will not grow or contract because the size will be ever the same, but a container with max-width: 340px or min-width: 320px can grow or contract depending of the property you've set for the container. So if you want a responsive block element, never use width choose or min-width or max-width.

}
#previewCard {
    max-width: 300px;
    height: 500px;
    background-color: hsl(216, 50%, 16%);
    font-family: 'Outfit', sans-serif;
    color: hsl(0, 0%, 100%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px;
    border-radius: 25px;
}

πŸ‘‹ I hope this helps you and happy coding!

Marked as helpful

1

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