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

social-proof-section using flex

Arush•180
@arushkumar05
A solution to the Social proof section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


How can I prevent scroll of elements when reducing size of the browser? How to make the elements stay at their place while minimizing so that they do not disappear from the viewport? Is writing more media queries for different resolutions is a fix or is there some other way as well? Currently I have written only 1 media query.

Any feedback is welcome. Thanks! :D

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

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

    👾Hi Arush, congrats on completing this challenge!

    Amazing solution! I’ve just opened the solution’s live site and I liked the job you’ve done a lot. I’ve some suggestions for you:

    The html markup for this solution its built entirely with <div>and you can improve it using semantics tags to describe what its inside each block of content. 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.

    To add the two wave svg background images in the (top/bottom),, the best way is by using background-image to manage it since adding them to the body you make sure it will be under everything, to manage different images inside a single css property as background-image you use the comma inside each properties declare the single modification for each circle separated. See the code below to see your solution with those backgrounds applied:

    
    
    background-image: url(./images/bg-pattern-top-desktop.svg), url(./images/bg-pattern-bottom-desktop.svg);
       background-position: left -185px top -236px, right 10px bottom -300px;
       background-repeat: no-repeat;
       background-attachment: fixed;
       background-size: contain, contain;
    

    ✌️ I hope this helps you and happy coding!

    Marked as helpful
  • Elaine•11,360
    @elaineleung
    Posted almost 3 years ago

    Hi Arush, this can be a tricky challenge to get optimal views, and when I was working on it, I needed to experiment a lot with what looks good. I think I used maybe 3 media queries to get it looking the way I wanted. You can have a look at what I did in my solution if you're interested: https://www.frontendmentor.io/solutions/mobilefirst-social-proof-section-9YtPL58Ph

    In your solution, the main thing is you have some fixed widths and paddings, and that could be causing the overflow where the elements end up getting pushed out of the viewport. I would simple remove the fixed widths and use responsive widths if needed. I also won't the padding the past out the description text from the star ratings. I used grid in my solution, but you can also try it with flexbox using justify-content: space-between. I also used a container in my solution to make sure the elements won't grow past a certain width.

    Lastly, you have a number of issues in your report, and thankfully they are fairly easy to fix since they just deal with the missing alt tag mainly. All you need to do is to add in an alt tag in each image.

    Good luck fixing this!

    Marked as helpful
  • Adriano•42,890
    @AdrianoEscarabote
    Posted almost 3 years ago

    Hi Arush, how are you?

    I really liked the result of your project, but I have some tips that I think you will like:

    I noticed that the content is breaking at 1400px, to fix this we can call the media query a little earlier, but of course it would be better to use a relative unit of measure, to make the content adapt while the media query is not activated.

    the rest is great!

    Hope it helps...👍

    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

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