1

Building out a flickity carousel to look like this and having some issues w/ spacing on my CodePen.

codepen

looks good but want to make spacing between slides less and also the spacing is fairly equal but not 100% equal between each. For example, it says left 10% for the spacing but if you put a few more vertical photos back to back, see this image for approximate spacing in pixels that are not the same equal widths (pic)

Images should be <img src="x"> versus background image as well for accessibility and adding alt tags too.

Anyone have any hints in the code on how to fix it so the images appear larger, then take up more space (so there's less space between the slides) and also ensure that any image i put in there is equally horizontally spaced between them? Seems very close on the example attached. I tried messing with the padding/widths on 1st one but it gets strange.

1 Answer 1

1

Remove height: 100% from the image and only leave width: 100% so all images are going to have the same horizontal space.

And use .ui-thumbnail-img to center the image inside it.

I create a jsfiddle for the solution. https://jsfiddle.net/vzphr3n5/3/

3
  • @Churchill if that solves your problem, please mark it as the correct answer. For your second question, you can add padding to .flickity to have more space around it. Commented Aug 15, 2022 at 1:45
  • @Churchill if that solves your problem, please mark it as the correct answer. Commented Aug 15, 2022 at 2:09
  • Upvoted since this partially fixed my issue Commented Jan 23 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.