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

3 Col Preview Card using HTML/CSS

Gerald Nwanekezie•40
@ognwan
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 will be appreciated. Thanks

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Nurcholis•420
    @cholis04
    Posted almost 3 years ago

    Hi Gerald Nwa Ekezie,

    I see you give a border when the button hovers. So, it would help if you gave the button a transparent border. This keeps your element's height from extending

    .cars button{
       ...
       /* New Transparent Border */
       border:1px solid transparent;
      ...
    }
    
    .cars button:hover{
        ...
        color: white;
        border: solid 1px white;
    }
    

    #happycoding

    Marked as helpful
  • Vanza Setia•27,715
    @vanzasetia
    Posted almost 3 years ago

    Hi, Gerald Nwanekezie! 👋

    Congratulations on completing this challenge! 🎉

    Some recommendations from me.

    • I would not recommend setting any width and height on the html and body elements.
      • There's no need to set width and height on the html element. I would recommend treating the body element as the page of the site instead.
      • There's no need to set width: 100% on the body element. By default, it is a block element so it will have full width. For the height, I would not recommend setting any height because it will make the body element not responsive. If you ever need to set a height then I recommend setting min-height instead. It's way more responsive because you are telling the body element, " hey, you need to at least this amount of height but you are allowed to grow if needed.".
    • I would recommend removing the body-wrap element. You can use body element instead.
    • I suggest using anchor tags for those "Learn more" buttons. As a user, I would expect if I click one of those buttons, it will navigate me to another webpage.
    • For the hover effect of those buttons, I would already include the border on the initial state. After that, when they get hovered, I will make the background-color of the button as transparent.
    • Lastly, fix all the accessibility issues that have been reported.

    That's it! I hope this helps. Let me know if you have any questions! 🙂

    Marked as helpful
  • nerometa•280
    @nerometa
    Posted almost 3 years ago

    You're doing great, dude! No major problems. Only minor problems that I think you can fix it.

    • Headings. It should be a bit bigger like 2rem or 36px. You also need to make sure that it's in uppercase. Can be done by text-transform: uppercase if I remember correctly

    • Buttons. Text can be bolder and font size a bit bigger.

    • Responsive: I understand that the challenge requires you to make desktop and mobile responsive, not in between. If you can make tablet responsive that's a plus.

    You can check out my solution on this challenge. I wanna hear your feedback as much as you do.

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

Oops! 😬

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

Log in with GitHub