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

3-Column Card Component(Flexbox+Responsive)

Vitor ant 60

@vitorantonionne

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello, I'm Vitor this is my solution to this challenge.

Any feedback that can help in cleaner code, for better responsiveness, all tips are always welcome.

Olá, sou Vitor esta é a minha solução para este desafio.

Qualquer feedback sobre como posso melhorar , reduzir o código desnecessário , dicas para ajudar na responsividade é bem-vindo!

Community feedback

@MelvinAguilar

Posted

Hi there 👋. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.

HTML:

  • Use the <footer> tag to wrap the footer of the page instead of the <div class="attribution">. The <footer> element contains information about the author of the page, the copyright, and other legal information.
  • You should use only one <h1> tag per page. The <h1> tag is the most important heading tag, This can confuse screen reader users and search engines. This challenge requires that Sedans, SUVs and Luxury are headings, but you can use the <h2> tag instead of the <h1> tag. You can read more about this here.
  • Not all images should have alt text. Car icons are for decoration purposes only, so they can be hidden from screen-readers by adding aria-hidden="true" and leaving its alt attribute empty:
<img src="assets/images/icon-sedans.svg" alt aria-hidden="true">
<img src="assets/images/icon-suvs.svg" alt aria-hidden="true" >
<img src="assets/images/icon-luxury.svg" alt aria-hidden="true" >
  • To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here. You can read more about centering in CSS here.
body {
    /* height: 100%; */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#container {
    display: flex;
    max-width: 90rem;
    /* margin: 0 auto; */
    /* margin-top: 8rem; */
   margin: 0.5rem;
}
  • Use max-width: 40rem; to #container selector instead of width: 40rem;, this will make the container card a bit responsive on mobile and set the element's maximum width to 40rem.

I hope you find it useful! 😄 Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Vitor ant 60

@vitorantonionne

Posted

@MelvinAguilar great details, thanks.

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