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

Single Price Component with HTML and CSS

accessibility
Cor-Ina•250
@CorinaMurg
A solution to the Single price grid component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi Everyone,

I am learning React and I picked this easy challenge to practice my skills, but now I’m a bit distracted by its design. The original design is beautiful but it does not meet the contrast ratio guidelines, so I wanted to try out different shades of green. The page does pass the contrast ratio test now, but the design is less … appealing.

Questions: Do you find my design acceptable? If not, what would you change? Would it work better if I replaced the green with a different color?

I completed this version with just plain HTML and CSS, but would like to try a different color scheme with the React version.

Thank you in advance for you feedback!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • _nehal💎•6,710
    @NehalSahu8055
    Posted about 2 years ago

    Hello Coder 👋.

    Congratulations on successfully completing the challenge! 🎉

    Few suggestions regarding design.

    • Responsive 💯

    • Instead of having multiple css files try to merge them in a main css file, it would impact a lot in the speed of loading.

    • Try to add accessibility features like aria, sr-only, title.

    aria : link

    .sr-only:link

    I hope you find this helpful.

    Happy coding😄

    Marked as helpful
  • Gesiere•780
    @Gesiere
    Posted about 2 years ago

    Great Work, your layout is perfect so is your design, Where my issues stands, would be the colors not matching the actual design. Compare the design that was given look at the colors and note where they are not similar.

    While the your layout is fine, you are not matching the colors in the design, all the same great work.

    And agreeing with the comment above some box-shadow would make the card section more pronounce.

    Marked as helpful
  • devendra•70
    @devendra-alt
    Posted about 2 years ago

    Hello @Cor-Ina, Great Work,

    I have some suggestions for you,

    • you can add box-shadow to the info card.
    • you can use the <article> tag in place of <main class="price"><main/>, it was a better choice from the website accessibility point-of-view.
    • you can use descriptive class names to make your code more maintainable and consistent.
    Marked as helpful
  • Abdul Khaliq 🚀•72,380
    @0xabdulkhaliq
    Posted about 2 years ago

    Hello there 👋. Congratulations on successfully completing the challenge! 🎉

    • I have other recommendations regarding your code that I believe will be of great interest to you.

    BODY MEASUREMENTS 📐:

    • Use min-height: 100vh for body instead of height: 100vh. Setting the height: 100vh may result in the component being cut off on smaller screens, such as mobile devices in landscape orientation

    • For example; if we set height: 100vh then the body will have 100vh height no matter what. Even if the content spans more than 100vh of viewport.

    • But if we set min-height: 100vh then the body will start at 100vh, if the content pushes the body beyond 100vh it will continue growing. However if you have content that takes less than 100vh it will still take 100vh in space.

    .

    I hope you find this helpful 😄 Above all, the solution you submitted is great !

    Happy coding!

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.