How can I display images of different sizes in this way? And is there jquery plugins to do that?
https://i.stack.imgur.com/ELll7.png
I noticed from inspect that he manipulates top and left properties and he gave images absolute position and dad fixed height so they don't pop out of elements, I tried to do it in CSS, but I think it needs javascript
CodePudding user response:
That style is called masonry, and yes, there are JQuery plugins that will help you achieve that. You will need to define a CSS Grid along with its elements, though. Here's a plugin for Masonry galleries,
https://masonry.desandro.com/#install
You'll need to add the file to your final website for it to work.