Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

3 Column Card

Sebastian•35
@PulseFiction
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


Any feedback is welcome!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted almost 4 years ago

    Hey, great work on this one. Right now the desktop layout is small and is a bit pushed on the right side. Responsiveness and mobile layout really needs to be looked on this one. But hey, at least you did manage to make something out of right^^

    Agata already gave great feedback on this one, just going to add some suggestions as well:

    • Always have a main element to wrap the main content of the page. On this one , the #container should be using main .
    • Avoid using height property with % or vh unit as this is not consistent for all users. If you try to inspect your layout in dev tools at the bottom, you will notice that the layout is squished since it only gets a portion of the available screen size. Instead, you should use rem value so that it will be consistent.
    • Since you are using position: relative to make the layout centered, what you could do instead is that, first remove all this properties on the #container:
    position
    margin
    top
    height # remove this for now or set a rem value on this 
    width # use Agata's point
    

    Then on the body tag add:

        align-items: center;
        display: flex;
        justify-content: center;
        min-height: 100vh;
        margin: 0;
        flex-direction: column;
    

    This will, the content will be always centered properly. Take note that I used flex-direction: column since there are 2 items directly inside the body tag.

    • Avoid using too much id attribute. When styling always use class to target different elements. id is not used because of css specificity.
    • Each car icons img should be hidden since they are only decorative images so use alt="" and add aria-hidden="true" attribute on every img.
    • Avoid using multiple h1 element on a page, use only at least 1. Change those h1 to h2. But a site needs to have at least 1 h1.On this case, you will make the h1 a screen-reader only text. Meaning it will be hidden for sighted users and only users that uses screen-readers will be able to know about it. Take a look at Grace's solution on this one, inspect the layout and see how she used the h1 and also the stylings applied to it. Copy those since you will need that a lot.
    • Lastly, the mobile state and the site's responsiveness:>

    Aside from those ,great work still on this one. If you have queries, just drop it here^

    Marked as helpful
  • Agata Liberska•4,075
    @AgataLiberska
    Posted almost 4 years ago

    Hi Sebastian! Nice work here, although some things could be improved.

    • I don't think there's a need to set a width for your #container here - just let your content take up as much space as it needs. Also setting a width is not the best choice here - on slightly smaller screens this will put the content off-center. Since you set the display to flex, you can center the content using justify-content: center (margin:auto won't work with flex)

    • It really would be good if you had mobile design here as well, especially that in this challenge, it's quite straightforward. By nature, divs will be in a column anyway, so all you need to do is restrict the width and center it in the body, and then add a media query to set the display to flex as you've got it here.

    • And lastly, my absolute favourite mind-blowing pro tip: you've got your border radius set on the outer cards - you can easily set it on the container if you add overflow: hidden - without it, the corners of the cards will cover those rounded one up :)

    Hope this helps, let me know if you've got any other questions!

    Marked as helpful

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

Oops! 😬

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

Log in with GitHub