In the news in the social network VKontakte, when there is more than one photo, they are distributed in a certain way in this news, depending on the size and quantity. How is this done? alt text

  • you can play with Grid system bootstrap - Andy

1 answer 1

There are several predefined image layouts.
Each scheme supports a different number of photos, and a certain combination of ratios of lengths and heights of images.

1 photo - full width of the wall (too high is cut off.)
2 photos - two images standing side by side (wide ones are cropped, a combination of images wide and high shifts the joint to the high side.)
3 photos - other schemes
and so 4,5,6..10 images, more than 10 schemes.

In general, look at your wall, at the wall of friends and analyze how the images are located there and which ones. Nobody will do the work for you here.

  • Do I need to connect JS there? or can you do everything in php? - Zow