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

@MXalman

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 did you find difficult while building the project? Which areas of your code are you unsure of? Do you have any questions about best practices?

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Hello @MXalman, Congratulations on completing this challenge!

Great code and great solution! I’ve few suggestions for you that you can consider adding to your code:

Fix the alignment. The best way make this alignment is by using FLEXBOX. The first step, is to add min-height: 100vh to make the body height size becomes 100% of the viewport height, this way you make sure the container will be aligned vertically since the body will display ever 100% of the screen height. After that add two flex properties to make the alignment display: flex / align-items: center; / justify-content: center;. If you're using the attribution you need to add flex-direction: column to make the attribution stays under the QR Code component. See the code below:

body {
    background: hsl(217, 54%, 11%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

REMOVE THE MARGIN:

.container {
    position: relative;
    width: 300px;
    height: 500px;
    /* margin: auto; */
    background: hsl(216, 50%, 16%);
    border-radius: 10px;
    margin-top: 100px;
    box-shadow: 0 0 10px rgb(0 0 0 / 20%);
}

✌️ I hope this helps you and happy coding!

Marked as helpful

1

@MXalman

Posted

@correlucas Thank you for the suggestions.

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