Skip to content
Advertisement

Display photos from Flickr in a responsive grid [closed]

I am trying to display photo’s obtained from a flickr image search API, and the display the images in a grid, so that they all fill the screen.

I have tried many different CSS layouts, such as this:

https://travishorn.com/responsive-grid-in-2-minutes-with-css-grid-layout-4842a41420fe

and this https://www.youtube.com/watch?v=wmeJMOxyD-w&list=LL&index=2&ab_channel=Programster

However, the images always appear in a single file column.

How could I edit the below code, so that the images are displayed in a grid?

JavaScript

Advertisement

Answer

Add the following styles first

JavaScript

Here is the the modified Code for you

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement