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

carde QR, eu usei margem auto e alinhei o texto e configurei a largura

@gleidsonfagno

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


De quais áreas do seu código você não tem certeza? a margem auto está dando um erro. O que achou difícil durante a construção do projeto? está em inglês eu tenho uma dificuldade no inglês.

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Fala Gleidson fagno, tudo bem? Parabéns pelo seu primeiro desafio e seja bem vinda a comunidade do Frontend Mentor!

1.A primeira coisa que você tem que fazer é adicionar algumas propriedades pro body, primeiro adicionamos display: flex e flex-direction: column pra alinhar tudo na vertical. Depois adicione min-height: 100vh (isso vai fazer com que o body tenha 100% da tela como tamanho) e com isso o elemento filho (no caso o container) vai se alinhar ao tamanho dele, no caso 100% da tela, dessa forma ele ficará centralizado, entendeu?

Acabei de ver sua solução e acho que ela está bem completa, tenho algumas dicas pra você:

REMOVER O PADDING E MARGIM PRA FAZER O ALINHAMENTO:

.principal {
    max-width: 320px;
    /* margin: auto; */
    /* padding-top: 50px; */
}

ADD ESSAS PROPRIEDADES PRA ALINHAR:

body {
    MIN-HEIGHT: 100VH;
    background-color: hsl(212, 45%, 89%);
    display: flex;
    align-items: center;
    justify-content: center;
}

👋 Espero ter ajudado e continue no foco!

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