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

Just basic CSS media queries

@Haileleul4337

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


The difficult part for me was making the card vertically centred but i figured it out after checking some resources form w3school but still having difficulty on it.

I am unsure of the size of the card. i think i made it a little bit bigger than the designs because if i made it smaller, those contents inside wouldn't fit with that size specially those paragraphs should be 18px so i decided it to make it a little bit big.

I need feedback and some suggestion of aligning items and sizing our div. thanks...

Community feedback

Lucas 90

@Lucassocorrosilva7

Posted

Parabéns pelo excelente trabalho em completar o desafio! Tenho algumas sugestões sobre seu código que podem ser úteis.

HTML:

  • Envolver todo o conteúdo principal da página dentro da tag <main> não só ajuda na organização do código, como também melhora a semântica do código, tornando-o mais acessível. Além disso, remover classes desnecessárias pode tornar o código mais limpo e fácil de manter.

  • É importante prestar atenção à estruturação dos cabeçalhos no seu documento. Para garantir uma hierarquia clara e coerente, é recomendável sempre iniciar com <h1> e descer os níveis de cabeçalho de maneira ordenada, como <h2>, <h3>, etc. Isso ajuda a tornar o conteúdo mais fácil de navegar e compreender para o leitor. Mantenha essa boa prática em mente ao criar seus documentos.

CSS:

  • Para centralizar o componente na página, sugiro utilizar o Flexbox ou o Grid. Abaixo, você pode ver exemplos de como implementar ambas as opções:
.body {
    width: 100%; 
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.body {
    width: 100%; 
    min-height: 100vh;
    display: grid;
    place-content: center;
}

Espero que essas sugestões sejam úteis!"

0
Sandro 1,170

@sandro21-glitch

Posted

Hi Haileleul

Use CSS grid or flexbox to create the layout, instead of using media queries.

Use semantic HTML elements for better accessibility.

Extract the repeated styles and create a separate class for them.

Use CSS variables for maintaining consistency in colors and fonts.

Organize your CSS code into separate files for different components or sections of your site.

Use a CSS reset or normalize stylesheet to standardize the default styling of HTML elements across different browsers.

Regularly test your code on different browsers and devices to catch any compatibility issues early.

Good Luck

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