Grid layout responsive

Please log in to post a comment
Log in with GitHubCommunity feedback
- @correlucas
👾Fala Rodrigo Cattoi, tudo bem? Parabéns pelo seu primeiro desafio e seja bem vinda a comunidade do Frontend Mentor!
Acabei de ver sua solução e tenho algumas dicas pra melhorar o código e o design:
Substitua o
div
por<main>
(toda página deve ter um landmark principal e também um título principal h1) Adicione uma margem em torno demargin: 20px
para evitar que o card toque nas bordas da tela enquanto diminui.A sua solução ficou muito boa, a estrutura html o design também, algo que você pode fazer para melhorar a imagem que precisa mudar entre mobile e desktop é usar<picture>
ao invés de<img>
dentro de uma div. Por motivos de SEO e mecanismos de pesquisa tipo Google e bing, não é uma boa prática importar esta imagem do produto com CSS, pois isso dificultará a localização da imagem no google. Você pode gerenciar ambas as imagens dentro da tag<picture>
e usar o código html para definir quando as imagens devem mudar configurando o dispositivomax-width
dependendo do dispositivo (mobile / desktop) Aqui está um guia sobre como usarpicture
:https://www.w3schools.com/tags/tag_picture.asp
👋 Espero ter ajudado e continue no foco!
Marked as helpful - @hyrongennike
Hi,
Congrats on completing the challenge Jus a few suggestion you can replace the rule on the body with following to center the card the page.
body { justify-content: center; display: flex; flex-direction: column; margin: 0px; align-items: center; min-height: 100vh; }
Marked as helpful
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