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

Single Price Grid Component

Andrei Roi•20
@Nunamniroi
A solution to the Single price grid component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  • I'm not sure about my responsive design, how correct it is.
  • not sure about naming css selector.

In general, I'm not sure that I used the best practices when creating the site, and I don't know what could have been done better. I will be grateful for the feedback

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Saulius K.•560
    @TH3RIV
    Posted over 2 years ago

    Hi, @Nunamniroi!

    Your card is nearly done, it could use a few adjustments:

    • You should be using landmarks. This case your card is your main content, so it should be wrapped between main tags. Makes it easier to understand the code and helps screen-readers to figure out your main content.
    • There is no need to use header element as it is part of your card. Just wrap your whole card in a container element:
    <div class="card">
        <div class="first-section">
             Section code...
        </div>
       <div class="second-section">
             Section code...
       </div>
       <div class="third-section">
             Section code...
       </div>
    </div>
    
    • Your button does not need a <p> element, just use text of whatever you want it to say.
    • You should not limit the width of your body, you can always limit the size of your elements within the body.
    • You can limit the width of your card using max-width property and you can center your card within the page using flexbox on your body element.
    • To round the card corners you use border-radius property. And if it's not showing, you use overflow: hidden.
    • Try to avoid using px values and use rem values instead.
    • Try using custom CSS properties for your projects, it is great habit to develop.

    Hope this helps! You got this!

    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

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