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

3-column preview card

Natasha B.•90
@nbuylding
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Amanda Buttineau•200
    @ab1820
    Posted over 2 years ago

    Hey lady!!! :) I just wanted to point out the border-radius around your card! Otherwise it looks awesome and I think I may try this challenge next! :P

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

    Wrap the three divs in the main tag. there is no need to add <a> after the button to make the cursor a pointer but rather give it a class for the styling.

    To center a content on a page, add min-height:100vh; to the body and remove the height value and the width value in the body. there is no need to give the body a padding value

    Give the main display : flex ; and a width value that sum of the width value if the three divs.

    Give .sedans , .luxury and .suvs a width value and padding value instead of the height value for a more responsive site. Give the button of each div a font color that is the same as the background-color of the div, a background-color of transparent and a font-weight of 700;

    In the media query give the main a width of 80% and flex-direction: column

    Hope am helpful HAPPY CODING

    Marked as helpful
  • Account deletedPosted over 2 years ago

    Hey there! 👋 Here are some suggestions to help improve your code:

    To not only improve your HTML code but to also identify the main content of you page, you will want to wrap your entire component inside the main element.

    More Info:📚

    MDN Main Element

    The “car images/icons” in this component are purely decorative; They add no value. So their Alt Tag should be left blank and have an aria-hidden=“true” to hide them from assistive technology.

    More Info:📚

    https://www.w3.org/WAI/tutorials/images/

    • The headings in your component are being used incorrectly. Since the h1 heading can only be used once, it is always given to the heading with the highest level of importance. This component has three headings of equal importance, so the best option would be to use an h2 heading since it is reusable and it will give each heading the same level of importance.
    • Your "buttons" were created with the incorrect element. When the user clicks on the button they should be directed to a different part of you site. The anchor tag will achieve this.

    More Info:📚

    MDN The Anchor element

    If you have any questions or need further clarification, feel free to reach out to me.

    Happy Coding!🎄🎁

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