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

Responsive social proof section using css grid

accessibility
Ovie Nathaniel•220
@ovie-best
A solution to the Social proof section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello, Frontend Mentor ?

I just completed this social proof section challenge using CSS grids.

I have an issue with the background-bottom image. It is not displayed. The thing I discovered while debugging my CSS code is that when I removed the absolute position property on the body element, which I used along side the display table to vertically align the content of my page, the background image would show. and when I set the position to absolute, the background image at the bottom will disappear.

I have tried other methods such as flex and grid in trying to align the content of my page vertically and none of them seem to be working. That's why I had to go with the table method, which requires absolute positioning.

Any suggestions on how I can solve this issue would be highly welcome. Thank you.

This is the link to my repo : https://github.com/ovie-best/Frontend-Mentor---Social-proof-section-solution.git

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Md5 dalton•1,430
    @md5dalton
    Posted almost 3 years ago

    Greetings Oviedev 👋

    I did play around with CSS flex box and grid to place your content in the center of the page and both work perfectly fine. Below is a snippet of CSS I used and I commented out the properties that you should remove.

    body {
       display: grid;
       place-content: center;
       min-height: 100vh;
       /* display: table; */
       /* position: absolute; */
       /* height: 100%; */
       /* width: 100%; */
    }
    

    Regarding the background images, I'll leave below a starting point where you can also play around and see how you can place those images the way you want and I'll also comment out properties that are unnecessary :

    body {
       background-position: top left, 50vh bottom;
       background-repeat: no-repeat;
       /* background-size: auto, cover; */
    }
    

    Happy coding. 👌

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

    👾Hello @ovie-best, Congratulations on completing this challenge!

    You did a really good work here putting everything together, something you can improve its your code html markup and semantics. You can replace the <div> that wraps each card with <article> you can wrap the paragraph with the quote with the tag <blockquote> this way you'll wrap each block of element with the best tag in this situation. Pay attention that <div> is only a block element without meaning.

    This article from Freecodecamp explains the main HTML semantic TAGS: https://www.freecodecamp.org/news/semantic-html5-elements/

    ✌️ I hope this helps you and happy coding!

    Marked as helpful
  • Vanza Setia•27,715
    @vanzasetia
    Posted almost 3 years ago

    Hi, Oviedev! 👋

    Congratulations on completing this challenge! 🎉

    It looks like you had solved the issues. So, I will just give some suggestions to improve this solution.

    • There should not be text in span and div alone whenever possible. Instead, wrap the text with a meaningful element like a paragraph element.
    • Hover effects on the non-interactive elements may confuse your users. They might think those elements are interactive elements. Interactivity should only be for interactive elements such as buttons or links.
    • Also, transitions and animations should be disabled when the users prefer not to see them. I recommend wrapping the transitions and the animations with the prefers-reduced-motion media query.
    @media (prefers-reduced-motion: no-preference) {
      /* animations and transitions */
    }
    
    • Not every image needs alt text. If the image does not provide any meaningful content, such as the star icons, consider using empty alt text (alt=””). This saves your screen reader users time as they navigate the page.

    That's it! I hope this helps! Happy coding! 😄

    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
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