I posted a question on this forum ten days ago regarding resizing portrait-oriented images to match the height of two landscape-oriented ones in the masonry grid. (I deleted the old post because it seems that it made me unable to create a new one into the same category.)
Now I have a new problem: while the image's height is correct and align with the two on its side, I still get a gap space under it so I continue to have the problem in the following rows. I think it depends on the wrapper or on the spacing between the rows in the grid but I cannot figure out how to write the solution in CSS.
Question
FedericoImperiale
Hello,
I posted a question on this forum ten days ago regarding resizing portrait-oriented images to match the height of two landscape-oriented ones in the masonry grid. (I deleted the old post because it seems that it made me unable to create a new one into the same category.)
I found out the right CSS to do that:
.gallery-masonry-item img {
max-height: 547px !important;
object-fit: contain !important;
}
Now I have a new problem: while the image's height is correct and align with the two on its side, I still get a gap space under it so I continue to have the problem in the following rows. I think it depends on the wrapper or on the spacing between the rows in the grid but I cannot figure out how to write the solution in CSS.
I attached a screenshot to show the situation.
Could you help me finish the code to solve this?
Thank you.
Edited by FedericoImperialeMistake in the tags
Link to comment
Top Posters For This Question
1
2
1
2
Popular Days
Jul 1
2
Mar 29
1
Jun 25
1
Jul 3
1
Top Posters For This Question
lu.diehl 1 post
tuanphan 2 posts
HannahRoseShaw 1 post
FedericoImperiale 2 posts
Popular Days
Jul 1 2021
2 posts
Mar 29 2022
1 post
Jun 25 2021
1 post
Jul 3 2021
1 post
Posted Images
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment