Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

3 column preview using HTML and CSS

Myro Joy Lee•120
@myrojoylee
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Completed another one! 2 full weeks of these beginner projects and I think I'm sort of getting the hang of things! I know I still have a lot to improve on but it's a huge improvement from the first week lol. Thanks all for your feedback, I do read all of them even if I do not get to respond to each one :D.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Hassia Issah•50,410
    @Hassiai
    Posted over 2 years ago

    To center .cars on the page using grid, add min-height: 100vh to the body.

    In the modile design , there is no need to give . cars a min-width value, reduce the max-width value for .cars e.g: .cars{ max-width: 350px;} give .content the same padding value for all the sides. .content{ padding: 3rem;}

    In the media query increase the max-width value for .cars e.g: .cars{max-width: 900px} there is no need to give .cars a margin value.

    Hope am helpful.

    Well done for completing this challenge. HAPPY CODING

  • Melvin Aguilar 🧑🏻‍💻•61,020
    @MelvinAguilar
    Posted over 2 years ago

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

    Do you work on a large-screen device ?

    One of the biggest problems is the large margins it uses. For example, margin: 14rem 21rem 10rem;: 21rem is 336px of margin on one side, giving 672px of margin total.

    When using the DevTool, keep in mind that the screenshot was taken with a resolution of 1440px. Your screenshot has a lot of white space due to the large margin. consider using a smaller margin or remove it

    Other suggestions:

    • 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.
    • You should use the <a> tag instead of the <button> tag because the Learn More button is a link to another page. Use buttons to perform actions like submitting a form or closing a modal and use links to navigate to another page. 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="./images/icon-sedans.svg" alt aria-hidden="true">
    <img src="./images/icon-suvs.svg" alt aria-hidden="true" >
    <img src="./images/icon-luxury.svg" alt aria-hidden="true" >
    

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

    Happy coding!

  • Myro Joy Lee•120
    @myrojoylee
    Posted over 2 years ago

    OK, this isn't feedback on myself, but a question. I line it up with the design it provides me but I'm always ending up super off when it loads on here. I have dev tools open and it says I'm all lined up but here it always isn't. When I open the site on my monitor it looks totally fine...Someone help lol. Thanks again :).

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub