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

3 Column Preview Card Component

P
Lawrence Caudle•100
@ltc870
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


Hey everyone! Another project in the books! Can I get some feedback please if you have the time! I would really appreciate it! This project was fun for a starter project. This project really allowed me to see how to utilize classes and modifying.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, awesome work on this one and congrats on your second challenge in here! Desktop layout looks nice, site is responsive, but your mobile breakpoint is too soon. Right now, you are showing the mobile state from 0px-1200px which is too big for mobile state to only occupy. Desktop layout could have used more of those screen-time. Though mobile state looks fine.

    Some other suggestions would be:

    • Using that grey background-color would be great so that it matches the design.
    • On this one, It would be great to have this markup:
    <main /> # main content
    <footer /> # contains the attribution
    

    This way, all content of your page will be inside their own respective landmark element.

    • Using margin to center a layout works fine but not enough if it involves y-axis. Try zooming out, you will see that the layout is not being centered properly. Another approach would be something like this, but first remove all the margin in the .container row selector and in the body tag add these stylings:
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    

    This way, it will make sure that the layout will stay centered.

    • You don't need to apply the orange background-color in the .container row selector so removing that would be great. Then to make those card items have a proper border-radius what you can do is that:
    1. On the first card, use `border-radius: .5rem 0 0 .5rem.
    2. On the second card don't use `border-radius:
    3. On the third, use border-radius: 0 .5rem .5rem 0

    border-radius can accept 8 values, but we are just going to use 4 in here since you don't need those extra. Each of the 4 items signifies, top-left, top-right, bottom-left and bottom-right.

    • Those car-icons are only decorative images. Decorative images should be hidden for screen-reader at all times by using alt="" and aria-hidden="true" to the img tag or only aria-hidden="true" if the image is using svg.
    • Only use descriptive alt on images that are meaningful and adds content to the site otherwise hide the image for screen-reader users.
    • Those car titles on the other should be using a heading tag since they give information on what each section would contain. Use h2 for each of them.
    • As you may know, a page needs to have a single h1. Since there are not visible text that are suitable to be h1, the h1 would be a screen-reader only heading. Meaning it will be hidden visually but present for screen-reader users. On this, the h1 would have like sr-only class and the text-content should describe what is the main-content is all about. The h1 could be placed as the first text inside the main. Have a look at this solution of Grace in this same challenge inspect the layout and see the usage of h1 as well the stylings applied to it.
    • Lastly, just lowering the breakpoints :>

    Aside from those, great job again on this one.

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

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

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

Log in with GitHub