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 Component

@AChoudhury-Cyber

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

@mreed4

Posted

Centering on a web page has come a long way since I first started teaching myself all of this stuff so long ago. One way to do it, a modern way that probably now has enough coverage across enough browsers, is to set the CSS as something like the following:

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

.container { /* This represents the main div of your page/app */
  margin: auto;
  width: 20rem;
  background-color: var(--very-dark-blue-card);
  padding: 1.25rem;
  border-radius: 1rem;
}
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