Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Responsive Four Card Feature Section using CSS Grid

P
M Rafay•140
@the-Exalter
A solution to the Four card feature section 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

  • Grace•32,130
    @grace-snow
    Posted 6 months ago

    I can spot some problems in this:

    • the alt needs to be empty on the icons because they are decorative
    • the mobile styles should really be the default styles. There's no need to define row heights in any screen size. It's actually very important to NOT limit the heights like that.
    • the grid only needs a max width in rem not a width.
    • the media query should be defined in rem or em not px so that the layout adjusts nicely for all users including those who have a different text size setting in their browser or device.
    Marked as helpful
  • Adam•340
    @nadam-design
    Posted 6 months ago

    Hi M Rafay!

    A few things to consider:

    • Grid columns: grid-template-columns: 415px 415px 415px; could be optimized, don't use px, instead use fr which is much more flexible. Use the repeat() if you have equal width columns: grid-template-columns: repeat(3, 1fr);
    • Grid rows: as Grace mentioned above no need to set the row heights. If you don't declare it's going to be auto, which means it's depends on content. You can use: grid-template-rows: repeat(2, 1fr); which means you only need two rows in this case.
    • As a frontend builder, your task is to faithfully follow the design plan in every detail: spacing, fonts, sizes, and colors. Strive for perfection, as this is a key expectation in this field. For example, in your solution, the colors were swapped. While this might seem like a small issue, it reflects a lack of attention to detail. Developing an eye for aesthetics takes a lot of practice, but it's essential if you want to improve and excel in this area.
    • Responsiveness: You’re currently using two layouts, mobile and desktop. While the task only specifies these two, it’s worth considering adding a third, tablet version (e.g., two columns, two rows) to create a more fluid experience.
    • There are still some discrepancies, such as the box shadows and widths. If I’m correct, you worked from a .jpg, which can make things more challenging. In this case, open the design in an image editor and measure everything precisely. It’s a meticulous process and requires more time and effort, but it will help you develop a mindset that pays closer attention to details.

    I believe you’ve got the basics down, but there’s still room for improvement in many areas. I’m confident you’ll get there! Keep it up!

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.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

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