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

Responsive landing page using HTML5 and CSS Grid

angular, bootstrap, wordpress
Fatoki Matthew•10
@iTech-Matt
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I don't really know how to make use of the CSS and I find it difficult to work it. Am unsure of my CSS I need suggestion on how to make use of CSS and be Good at it. Thanks

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Vanza Setia•27,715
    @vanzasetia
    Posted about 3 years ago

    Hi there! 👋

    I suggest fixing up the HTML markup first.

    • The width and height attributes for the img element should be used to create a placeholder before the image is fully loaded. This is going to prevent jumping layout or reduce the Cumulative Layout Shift. There's an article from web.dev about "Optimize CLS" to learn more about it.
    • Remove all br elements from the heading and paragraph. Let lines wrap where they need to. br elements will be read out by screenreaders. You can't accommodate every screen size, so it's rare you'll ever need to use them.
    • For the about section, I recommend changing it to a list item, because if the site has no styling, it is more likely a list item.
      • 10K+ companies
      • 314 templates
      • 12M+ queries
    • Also, it's best to write HTML without any CSS. This way, it can help you decide better HTML markup. Think of it like a document file which in my opinion the same as the site with no styling.
    • Use CSS to uppercase the text. The uppercased word in the HTML might be spelled by the screen reader (spelled letter by letter).
    • Lastly, fix all the issues that have been reported by Frontend Mentor by clicking the "View Report" button.

    For the CSS.

    • Import and use the correct font family. See the style-guide to know the font family.
    • Use single class selectors for styling whenever possible instead of id. id has high specificity which can lead to a lot of issues on the larger project. Also, it's best to keep the CSS specificity as low and flat as possible. 😉
    • Use rem or sometimes em unit instead of px. Using px will not allow the users to control the size of the page based on their needs. Also, I have a great article that will explain rem and em units in a simple way. I recommend reading it if you're not confident to use those units.

    I know that I'm not very specific about the CSS though all the things that I mention will be a good thing to get used to.

    That's it! Hope this helps. 😊

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