Problem: Responsive Image Gallery Grid
Problem description
Given a collection of thumbnail images inside a container, implement a responsive grid that:
Displays as many columns as possible with each thumbnail at least
150pxwide.Automatically wraps thumbnails to new rows when they overflow.
Maintains a
10pxgap between images.
Goal
Write CSS in styles.css to configure a gallery container that adapts fluidly to the viewport width, resizing and wrapping thumbnails without any media queries.
Constraints
Use CSS Grid only.
Do not use media queries.
Set thumbnail width with a minimum of
150pxand a maximum of1fr.Keep a
10pxgap between items.
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.
Problem: Responsive Image Gallery Grid
Problem description
Given a collection of thumbnail images inside a container, implement a responsive grid that:
Displays as many columns as possible with each thumbnail at least
150pxwide.Automatically wraps thumbnails to new rows when they overflow.
Maintains a
10pxgap between images.
Goal
Write CSS in styles.css to configure a gallery container that adapts fluidly to the viewport width, resizing and wrapping thumbnails without any media queries.
Constraints
Use CSS Grid only.
Do not use media queries.
Set thumbnail width with a minimum of
150pxand a maximum of1fr.Keep a
10pxgap between items.
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.