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

Nested Grids and Flexbox

Rafael La Buonora•160
@rlabuonora
A solution to the Social proof section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I got in trouble getting the sizing of the nested grids right (specially the testimonials section). Any help would be greatly appreciated!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, great work on this one. The desktop layout looks fine, though the h1 is small, the text below it is not using a left-alignment and maybe adding more padding to the body or in a container so that the content won't look like spaced out. The site responds but if you go to at 500px upwards, you will see that the content is being hidden by the screen and creates horizontal scrollbar.

    Here are some other suggestions for the site:

    • Avoid using height: 100% or height: 100vh on a large container like the body as this makes the element's height capped based on the viewport/screen's height. Instead use min-height: 100vh so that the element will expand if it needs to.
    • The font-weight: 700 on the h1 could be remove since by default it already uses this.
    • For the .reviews selector, you don't really need to use grid on that one since the it's direct child is already a block element that will wrap on its own row. You just need to use margin on those item to place them properly like on the design.
    • For each .review, using article on them is not the best choice since an article tag usually contains content that is independent and could be redistributed on another page since it can sit on its own. For this one, you could just use div on each.
    • Each of the star icons, you can just use the image path as the value for the background property of each .review selector. Remember that background can contain multiple image, this way you won't have to create multiple img tags.
    • Though, if you insist on using img tags for the star-icons, then make sure to add alt="" and aria-hidden="true" so that screen-reader will skipped that image since it is only a decorative image.
    • For each person's img tag, it would make sense to use their full name as the alt value since it is already present.
    • Also, for each testimonial, you could use this markup below so that it will be easy for screen-reader to traverse it using blockquote:
    <figure>
     <img src="" alt={person name}>
     <blockquote>
       <p> {qoute in here}</p>
     </blockquote>
     <figcaption>
       person name
       <p>
         person role
       </p>
     </figcaption>
    </figure>
    

    Though you just need to use grid on the figure to place each item properly since a figcaption should be the first or last item of a figure element.

    • The verified-buyer should not be using a heading tag since it doesn't really give information on what a section/part of the layout would contain. A p tag on it would be nice.
    • Lastly, addressing the responsiveness issue on the site:>

    Aside from those, great job again on this one.

    Marked as helpful
  • Rafael La Buonora•160
    @rlabuonora
    Posted over 3 years ago

    Hi! Thanks a lot for your feedback. I recoded the layout to solve some of the problems you pointed out.

    I focused mainly on the layout because I'm trying to learn that, so I didn't implement the semantic html suggestions. I'll probably revisit it in a few days for those.

    Thanks again!

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 1st-party linked stylesheets, and styles within <style> tags.

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.

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