Hello. There are several images, all about the same size. I want to display these images on the page in this style. enter image description here

Thought just to do

imga img { width: 50%; } 

But then they are all the same size. Probably there can not do one css. I would be grateful for useful information.

1 answer 1

Of course, imga img { width: 50%;} is indispensable. Both css and js are needed here.

I suggest you take a look at freewall .

This is a cross-browser responsive Jquery plugin that helps you create many different types of grid layouts: flexible layout, photo layout, embedded layouts, metro style, like pinterest and other types. It uses CSS3 animation. This plugin is a good solution for dynamically creating a grid layout for both desktop and mobile versions and tablet versions.

plugin home page


If he is not satisfied, then in the search for javascript photo brick you can, I think, find something else suitable for you, for example

http://masonry.desandro.com/

http://callmecavs.com/bricks.js/

and much more.

  • PR is allowed? More like a product advertisement than a response on a topic. - user207618
  • @Other me, what is your manager?)) If you have a more suitable way to write an answer or your own, please offer :) - Alexey Shimansky
  • I do not mind, just very much like a PR post. - user207618
  • @Other sorry, I didn’t want to) - Alexey Shimansky