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

Four card feature section

Fopefoluwa Ikufisile•850
@FopefoluwaIkufisile
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

  • P
    Petter Torst Saatvedt•180
    @PetterTSaatvedt
    Posted 6 months ago

    Great work on your solution, it works as intended on both desktop and mobile, with good responsiveness :-) Your HTML is semantic and well structured, which supports maintainability - well done! I also see some good approaches in your css, like use of variables, using rem to support scalability in text, and use of media queries for adjusting layout in relation to screen width.

    If I were to pinpoint some areas in which your solution could become even better, it would be the following:

    • Design: Spend a bit more time getting to know the provided design resources, and try to get as near the design as possible. As frontend developers, we should strive towards implementing pixel-perfect solutions from the designs which are given to us. For your solution, I would recommend setting a max-width of 22rem on the cards, to align with the design. Also, the shadow of the cards could use a bit of blur, to create a smoother shadow effect. Try upping the blur value (third value provided to the box-shadow property) to 1rem for example :-)
    • DRY css: Although your css is very readable and well structured, I would recommend to follow a "don't repeat yourself" approach (DRY), which essentially means to minimize code repetition as much as possible. For instance, I see that you have made separate css classes for all four cards, which is understandable as they have some different positioning in the grid and different colors for the top border. However, values for properties like background-color, padding, position, and border-radius are equal for all four cards. These could be moved into a separate class, perhaps called "card", which could then be supplied to the cards in your HTML, alongside your more specific classes.

    Overall, I think you have done a good job on this solution, and I wish you the best of luck on your coding adventure! :-)

    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