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 Preview Card Component, HTML, CSS, flexbox, mobile first

Andres Abarcaβ€’ 20

@andres-av

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 Everyone!

I just posted the solution for this challenge, I had a lot of fun doing it and resolving some margin and padding "puzzles".

My goal was to make this challenge pixel perfect even with the paragraphs break lines. However, I am not sure if this approach has made my css larger than what it's needed.

Please, if you have any feedbacks about this or any other suggestions, feel free to let me know.

Community feedback

Abdul Khaliq πŸš€β€’ 72,620

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

HEADINGS ⚠️:

  • This solution has also generated accessibility error report due to lack of level-one heading <h1>
  • Every site must want at least one h1 element identifying and describing the main content of the page.
  • An h1 heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
  • So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a sr-only class to hide it from visual users (it will be useful for visually impaired users)

CSS 🎨:

  • let me explain, How you can easily center the component for better layout.
  • We don't need to use margin and padding to center the component both horizontally & vertically. Because using margin or padding will not dynamical centers our component at all states
  • To properly center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here πŸ“š.
  • For this demonstration we use css Grid to center the component
body {
    min-height: 100vh;
    display: grid;
    place-items: center;
}
  • Now remove these styles, after removing you can able to see the changes
.card {
   margin: 80px auto;
}

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

0

Andres Abarcaβ€’ 20

@andres-av

Posted

@0xAbdulKhalid

Wow! you went above and beyond on this feedback, I really appreciate all the information you shared with me because those were topics I did not know of.

Thanks to this I have homework now and I know it will improve my coding skills in the future.

Once again, Thank you so much!!

0
Basant Soniβ€’ 450

@SoniBasant

Posted

Your hard work shows in this project. Very good job.

As for the suggestion -

  • Use h1 for <h2>SEDANS</h2>. One heading is necessary in semantic coding. That's why the warning Page should contain a level-one heading. You can handle font-size in CSS.
  • Use flex in body so your solution will be at center.
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

Other than that no suggestion. Good work. : )

Marked as helpful

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