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

Stats preview card component using html/css

@costaguh

Desktop design screenshot for the Stats 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

👾Oi @costaguh, tudo bem? Parabéns pelo desafio!

Acabei de ver sua solução e tenho umas dicas pra melhorar seu código/design:

Ao inves de usar grid Pra fazer o alinhamento vertical você vai ter que usar min-height: 100vh pra fazer o body ficar com o tamanho de no mínimo 100% da altura da tela e fazer com que o container alinha com essa altura, desse jeito o card vai ficar sempre alinhado ao centro usando display: flex / align-items: center e justify-content: center.

body {
    font-family: "Inter", sans-serif;
    background-color: var(--primary-very-dark-blue);
    display: flex;
    /* width: 100vw; */
    height: 100vh;
    place-items: center;
    justify-items: center;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

👋 Espero que essas dicas te ajudem e que você continue no foco!

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