Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive social proof section using css grid

#accessibility
Ovie Nathanielβ€’ 220

@ovie-best

Desktop design screenshot for the Social proof section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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

Community feedback

Md5 daltonβ€’ 1,430

@md5dalton

Posted

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

1

Ovie Nathanielβ€’ 220

@ovie-best

Posted

@md5dalton Thanks alot. I will try it out immediately

1
Ovie Nathanielβ€’ 220

@ovie-best

Posted

Thanks once again @md5dalton

I just applied the code for vertical alignment of the content you suggested and it worked perfectly πŸ˜‰πŸ˜‰πŸŽ‰πŸŽ‰

For the background image, it displayed all by itself after adding the code for the vertical alignment. The only thing I did about the background image was the removal of the auto and cover values and that was it.

There's alot of power in CSS grids when it comes to layout.

0
Md5 daltonβ€’ 1,430

@md5dalton

Posted

You're welcome @ovie-best ...

I'm glad that helped you. πŸ‘Œ

0
Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

πŸ‘Ύ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

0
Vanza Setiaβ€’ 27,855

@vanzasetia

Posted

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

0

Ovie Nathanielβ€’ 220

@ovie-best

Posted

@vanzasetia thanks for your suggestions, I will apply them going forward

0
Ovie Nathanielβ€’ 220

@ovie-best

Posted

@vanzasetia thanks for your suggestions, I will apply them going forward

0
Ovie Nathanielβ€’ 220

@ovie-best

Posted

@vanzasetia thanks for your suggestions, I will apply them going forward

0
Ovie Nathanielβ€’ 220

@ovie-best

Posted

@vanzasetia thanks for your suggestions, I will apply them going forward

0
Vanza Setiaβ€’ 27,855

@vanzasetia

Posted

@ovie-best No problem! πŸ‘

P.S. It looks like you are clicking the "Post Reply" button four times. Next time, please only click it once (and be patient). Otherwise, it will give me four notifications. πŸ™‚

0

Please log in to post a comment

Log in with GitHub
Discord logo

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