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

four card feature section

Daniel•700
@DanielArzani
A solution to the Four card feature section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


The middle two cards ended up being too small on desktop, its just that I ran out of space on my grid, I thought about making the cards smaller but it seemed kind of strange that the cards would be smaller on desktop than on mobile. Any suggestions would be appreciated.

Thanks

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Lucas 👾•104,160
    @correlucas
    Posted almost 3 years ago

    👾Fala Daniel, tudo bem? Parabéns pelo desafio!

    Acho que o jeito mais fácil de resolver esse problema do tamanho dos cards seria criando um container na class que tem o grid pra limitar o tamanho de todos os cards, tipo max-width: 1110px e color uma largura maxima pra todos cards tipo max-width: 300px desse jeito o tamanho deles fica padronizado. Pra melhorar a semantica vc pode substituir a div de todos os cards com article por exameplo.

    Aqui minha solução pro mesmo desafio caso vc queira usar como base:

    https://www.frontendmentor.io/solutions/4-card-feature-section-vanilla-css-custom-design-glassmorphism-35MDUfOBdt

    👋 Espero ter ajudado e continue no foco!

    Marked as helpful
  • P
    Harm Intemann•590
    @ghintema
    Posted almost 3 years ago

    Hi Daniel,

    with respect to your question, why are the two cards in the middle smaller than the outer two cards... You created an 8-column grid and assigned three columns each for the outer ones and two columns for the middle ones. So isn't it obvious that way to be different sized? :) This should fix the problem: Chance the grid-column for .card--supervisor from 1/4 -> 2/4 and for card--calculator from 6/9 -> 6/8. It worked for me in the dev-tool.

    Hope I could've helped you! :)

    Marked as helpful
  • P
    Harm Intemann•590
    @ghintema
    Posted almost 3 years ago

    Other part of the problem could be the sizing of the cards wich depend on the ch... I'm not fully familiar with the clamp-function. But I would try to assign a fixed with or %-width to all cards to make sure that all cards have the same width indepedently of there content...

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