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

Responsive 3-column card preview component using css Flexbox

Ovie Nathanielโ€ข 220

@ovie-best

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


Greetings, Frontend Mentor. This is my solution to the 3-column Card Preview component. Any suggestions on how I can Improve is welcomed!

Community feedback

Lucas ๐Ÿ‘พโ€ข 104,580

@correlucas

Posted

๐Ÿ‘พHello @ovie-best, Congratulations on completing this challenge!

Great code and great solution! Iโ€™ve few suggestions for you that you can consider adding to your code:

1.Improve your html markup using meaningful tags to wrap the content, you can replace the div youโ€™ve used for each card with <article>. Remember to wrap big blocks of content with semantic tags and never divs, use divs for small blocks.

2.Use max-width: 100% for the cards in the mobile version to allow the cards grow 100% of the width considering the paddings and avoid to have a lateral gap (limited by a fixed width).

3.Donโ€™t use id to give the style of your elements, it's not a good idea because id is a too specific selector used for forms and Javascript code. Instead, use class for styling and let the id for much specific stuff. It's also not advisable to use IDs as CSS selectors because if another element in the page uses the same/similar style, you would have to write the same CSS again. Even if you don't have more than one element with that style right now, it might come later.

โœŒ๏ธ I hope this helps you and happy coding!

Marked as helpful

0

@VCarames

Posted

Hey, some suggestions to improve you code:

  • The car images/icons serve no other purpose than to be decorative; They add no value. Their Alt Tag should left blank and have an aria-hidden=โ€œtrueโ€ to hides it from assistive technology.

  • The headings are being use incorrectly. The <h1> Heading can only be used ONCE per page. For this challenge, each heading is equally as important. So best option, is to use <h2> Heading, because it will give each card the same level of importance and it's reusable.

  • Your "buttons" were created with the incorrect element. When the user clicks on the button they should directed to a different part of you site. The Anchor Tag will achieve this.

  • Your CSS Reset is extremely bare and being underutilized. To fully maximize your CSS reset, you want to add more to it.

This is not enough:

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

Here are few CSS Resets that you can look at and use to create your own or just copy and paste one that is already prebuilt.

https://www.joshwcomeau.com/css/custom-css-reset/

https://meyerweb.com/eric/tools/css/reset/

http://html5doctor.com/html-5-reset-stylesheet/

Happy Coding!

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