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

Single price grid component using html and css

accessibility
Ravindra Suresh Kadam•80
@socoolRK
A solution to the Single price grid component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is another project from a front-end mentor I have completed and I will appreciate the valuable feedback from the community.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Dave•5,295
    @dwhenson
    Posted over 3 years ago

    Hey, @socoolRK nice work here - here are a few suggestions you might like to consider:

    • I'm not sure why you would add min-height 150vh to the body? It adds a lot of unnecessary scrolling to the page. I would suggest just adding max-height:100vh.
    • If you do the above and want to center things, in this case, I would suggest wrapping all the content in a div or maybe a section and then using display grid or flex on the body to put this new only child element in the center of the page - this is pretty handy for quite a few FEM challenges so it's worth finding an approach that works for you (I tend to use: display:grid; place-items:center;.
    • Just a note on the use of headings... We shouldn’t use headings to make text look BIG or bold. Use them only to set out your document's heading and show the document structure, and then change things up with CSS after that. This is important as many people using assistive tech to access your pages will navigate the site based on the heading structure. At the moment this wouldn’t work with your HTML.

    In this case, for example, you have an h2 followed by h4 (which probably shouldn't really be a heading but just a p with some styling). Most people suggest that there should only be one h1 per page so your first h2 might be better as an h1 in this case. I approach this by first laying out the page using only HTML and only thinking about the document structure, not design at all, and then once done, I return to the page and use CSS to make things look how they should.

    Again, this will come up over and over again in FEM challenges so it's worth getting an approach to this that works for you down that you can apply in other challenges too.

    But, the component looks great! And nice job using the ul for the list - a lot of people miss this! Keep up the good work.

    Cheers Dave

  • Fluffy Kas•7,655
    @FluffyKas
    Posted over 3 years ago

    Hey there,

    There's a few issues here, the biggest being the way you achieved the layout. You'd need to use either flexbox or grid for this, instead of individually positioning each element with position: relative. I could go into detail with the accessibility issues and other smaller things but it feels like you're missing some core concepts.

    I'd recommend checking out Kevin Powell's channel if you haven't already done this. He has a great beginner course on HTML and CSS. It's a few years old, but for learning the core concepts it's still an excellent source!

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub