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

3 Columns preview card using CSS Grid.

bem
Riikis•20
@Rikvdev
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


I tried to make this with dinamic grid using auto-fit , without media queries, but I had some errors with padding and container width, so I did it with media queries.

Did I do it right?

Are there any errors?

Where could I improve to make it better?

I would like to read your opinion :)!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • PhoenixDev22•16,830
    @PhoenixDev22
    Posted over 2 years ago

    Hi Riikis,

    Congratulation on finishing this challenge. Great job on this one! I have few suggestions regarding your solution:

    HTML

    • Page should contain <h1> . The <h1> is most commonly used to mark up a web page title. This challenge is supposed to be one component of a web page. To tackle the accessibility issue in the report , you may use an <h1> visually hidden with class=”sr-only”. You can find it here.
    • You can upload the two sets of Google fonts in one CSS link , after selecting both font family, you can copy the CSS link that contains both font families.
    • In this challenge, the images are much likely to be decorative. For any decorative images, each img tag should have aria-hidden="true" attribute to make all web assistive technologies such as screen reader ignore those images .
    • Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=”_blank” attribute, you can expose your site to performance and security issues.
    • line-height: 1.8rem;Use a unitless line-height value to Avoid unexpected results. You can read more in mdn
    • Consider using rem for font size , it' not recommended to use px for font size as absolute units don’t scale for example 15px will always be 15px on the same device. Using pixels is a particularly bad practice for font sizing because it can create some accessibility problems for users with vision impairments.

    You absolutely did great job readable and reusable code.

    Hopefully this feedback helps.

  • Nurul Arifin•310
    @nurularifin83
    Posted over 2 years ago

    The solution for the warning Page should contain a level-one heading <html lang="en">:

    • Put this code <h1 class="visually-hidden">3-column preview card component examples</h1> below <main>, if you use bootstrap just put this class class="visually-hidden" for hidden text. If you did not use bootstrap then just make like this <h1 style="display: none">3-column preview card component examples</h1>. Hope it can help you.

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