When using Flickity cells to contain both multiple elements (in this case an image and a caption), I'm not able to correctly centre the prev/next buttons. For example, in the below reduced test case, I want the buttons centred with the .image, rather than the overall .carousel-cell. In my real world example, the height of .image is unknown as it is scalable, so I cannot make use of anything like calc().
If you're unable to accurately control the position of prev/next buttons with CSS, then you may have to resort to using JavaScript to read cell or image height and set a value using some calculation.
When using Flickity cells to contain both multiple elements (in this case an image and a caption), I'm not able to correctly centre the prev/next buttons. For example, in the below reduced test case, I want the buttons centred with the
.image
, rather than the overall.carousel-cell
. In my real world example, the height of.image
is unknown as it is scalable, so I cannot make use of anything likecalc()
.Is there any other approach?
https://codepen.io/kaleidografik/pen/MdMbgX