You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using splide in a snippet and a custom field for extra attachments I managed to automate a carousel to show in each post (in a site with thousands of posts). I have 6 images of the same dimensions per each post. (their height is 355px).
When loading a grid of different posts the slideshows of each work fine in each post excerpt but unfortunately it appears it calculates the vertical size of each of the 6 images in the slider and adds them up to the total vertical size and that creates a huge gap in the grid to the next post excerpt underneath, obviously the slideshow displays as a single row but it has already calculated vertically all the images before showing them in a line block.. (it does for that portion of the excerpt a calculation of 355pxx6 creating a huge vertical size).
I tried in the splide__slide class to add a display:block, tried font-size:0 and tried max-height with different values.
When I give a very small height or max-height value it adds up to something smaller than the total vertical size of the post snippet on the grid and there is no gap but when opening the full size post obviously the slideshow is short and cropped.
I detected the problem because with the resize sensor I could see every time I resized the window it removed the gap (it had already calculated the maximum and applied the slideshow so it was no longer a huge vertical post excerpt).
How can I make the vertical size of the total addition of images just the size of one row (maximum height of the single image)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am looking for ideas to fix this:
Using splide in a snippet and a custom field for extra attachments I managed to automate a carousel to show in each post (in a site with thousands of posts). I have 6 images of the same dimensions per each post. (their height is 355px).
When loading a grid of different posts the slideshows of each work fine in each post excerpt but unfortunately it appears it calculates the vertical size of each of the 6 images in the slider and adds them up to the total vertical size and that creates a huge gap in the grid to the next post excerpt underneath, obviously the slideshow displays as a single row but it has already calculated vertically all the images before showing them in a line block.. (it does for that portion of the excerpt a calculation of 355pxx6 creating a huge vertical size).
I tried in the splide__slide class to add a display:block, tried font-size:0 and tried max-height with different values.
When I give a very small height or max-height value it adds up to something smaller than the total vertical size of the post snippet on the grid and there is no gap but when opening the full size post obviously the slideshow is short and cropped.
I detected the problem because with the resize sensor I could see every time I resized the window it removed the gap (it had already calculated the maximum and applied the slideshow so it was no longer a huge vertical post excerpt).
How can I make the vertical size of the total addition of images just the size of one row (maximum height of the single image)?
Anyone ever had the same problem?
Beta Was this translation helpful? Give feedback.
All reactions