CSS grid with uneven rows (Pinterest style)
P粉710478990
P粉710478990 2023-09-09 14:12:15
0
1
488

I'm trying to create a 3 column multiple row grid of links (img text). The problem is that my images are not the same height, so I get results like this:

I'm trying to find what CSS grid properties are needed to get a result like this.

I tried just making 3 divs (per column) with multiple links in them, but the order was not correct when responding.

Can you help? Thank you so much.

P粉710478990
P粉710478990

reply all (1)
P粉994092873

I think, you can putdisplay: flexin the parent div Then add in each column the number of images to render

Now you don't have to worry about the images having different heights.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!