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 testimonial section with HTML and Grid CSS

Maobugichi 130

@Maobugichi

Desktop design screenshot for the Testimonials grid section coding challenge

This is a solution for...

  • HTML
  • CSS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

Proud that i was able to decipher this in way less time than i thought!

What challenges did you encounter, and how did you overcome them?

my grid sizing

What specific areas of your project would you like help with?

nothing

Community feedback

Darek 140

@DarekRepos

Posted

Greetings! Great job!

I have one small additional suggestion. In addition to setting the container wrapper and width value, it's also best to set a defined height value.

check this example:


body {
  <div class="wrapper">
    <main></main>
    <footer></footer>
  </div>
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1400px;
  flex-direction: column;
  margin: auto;
  height: 100vh;
  height: 100dvh;
}

You can use the dvh unit (it will resolve some issues with mobile devices), but it's not currently supported by all browsers. If a browser doesn't support 100dvh, it will fallback to using 100vh instead.

The dvh unit seems to be the best choice. We are sure that:

  • containers will occupy 100% of the available vertical space,
  • they will definitely fit when the page loads,
  • they will enlarge during page scrolling and therefore change their size.

You might be wondering now: why use lvh and svh when dvh combines the best features of both?

Using dvh will change the height of elements during scrolling - when we display the page and the browser interface elements are visible, the container height will be smaller. When we start scrolling and the interface elements hide, the container height will be larger.

There are many resources about height and optimal solutions, such as this video: link: https://www.youtube.com/watch?v=veEqYQlfNx8.

I hope you find this helpful. Keep coding (and happy coding too!)

Marked as helpful

0

@tufcoder

Posted

I have some observations about your code:

  • Use more semantic tags like section or article instead div.
  • To a better sizing, try put the grid in a container/wrapper, so you could adjust the width.

Well done, keep coding!

0

Maobugichi 130

@Maobugichi

Posted

thanks so much@tufcoder

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