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

QR code component (html + css)

@LucianoOliveira1

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


Pt: Sempre aberto a dicas e sugestões! En: Always open to tips and suggestions!

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Fala Luciano, tudo bem? Parabéns pelo desafio!

Olhei seu código e deixei algumas sugestoes pra vc:

Pra deixar o container responsivo junto com a image vc tem que remover os width e min-width e usar somente o max-width: 285px pro container escalar

Aqui as mudancas que fiz pro seu codigo:

main {
    max-width: 285px;
    background-color: hsl(0, 0%, 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* max-width: 21%; */
    padding: 15px;
    border-radius: 20px;
}

O melhor jeito de usar a image aqui seria inserindo ela dentro do html com <img>, pelo background-image vc tem mto pouco controle, pra deixar ela responsiva use display: block e max-width: 100%

.code {
    display: block;
    max-width: 100%;
    /* background-image: url(images/image-qr-code.png); */
    /* background-size: cover; */
}

👋 Espero ter ajudado e 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