DEV Community

Discussion on: Create an Exclusive Product Landing Page using HTML CSS & JS

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️ • Edited
.right_container {
    width: 100%;
    height: 100%;
    /* ... */
}
Enter fullscreen mode Exit fullscreen mode

This right here tells me you haven't completely given your soul to the grid 😆

You don't need to (nor should you 😖) set the width and height on the children; the grid should set a default for how the elements are aligned and stretched within.

This is how I'd do it instead:

.wrapper {
   display: grid;
   place-items: stretch;
   place-items: stretch;
   /* ... */
}
Enter fullscreen mode Exit fullscreen mode

😉

Collapse
 
ananiket profile image
Aniket

That's a great change ! Thanks a lot for enriching my knowledge as well...

Happy Coding 🙏🏻