Okay
  Public Ticket #2536952
Mixed image ratios for carousel gallery
Closed

Comments

  • ctangmo started the conversation

    Hello, I have images with different ratios and I can't get the elementor editor to adapt the image ratios. I need the carousel to imitate the structure of my previous site where it allows landscape and portrait images to be the height throughout. I've tried resizing and saving the image in the same height (1000 pixels), setting auto height, and custom height in the editor but none of these are working. When I set the custom height it makes all the images have the same height, but the landscape size gets cropped into portrait.

  •  933
    Neuron replied

    Hi,

    I am very sorry for the late reply, we were not working on the weekend.

    Please add the following code to Appearance > Customize > Additional CSS, and then set a value to the height in Elementor.

    .h-background-image-style {
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
    

    So it will look something like this.

    https://prnt.sc/ugwnzc

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thank you for the workaround. Unfortunately, the padding between the portrait and landscape images are spaced unevenly and the title underneath the portrait ratio images are misaligned. Is this inevitable?

  •  933
    Neuron replied

    Hi,

    Can you please provide me with your WP-admin, so i will check it and fix it.

    Feel free to ask for anything you need.

    Kind Regards


  •   ctangmo replied privately
  •   Neuron replied privately
  •   ctangmo replied privately
  •   Neuron replied privately
  •   ctangmo replied privately
  •   Neuron replied privately
  •   ctangmo replied privately
  •  933
    Neuron replied

    Hi,

    We've added you the following code at Media Gallery element  > Advanced tab > Custom CSS.

    selector .owl-stage .owl-item:first-child {
        width: 60% !important;
    }
    selector .owl-stage .owl-item:nth-child(2) {
        width: 37% !important;
    }
    selector .h-calculated-image,
    .h-calculated-image img{
        min-height: 800px;
    }

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thank you so much, and it works perfectly until I started adding my other images. Is there a way to modify the code when I need 3 items on the carousel at a time, 15 items total? I understand it's not the theme's fault, it looks like Elementor doesn't have this functionality with mixed image ratios and I really appreciate the adjustments your team is making.

  •  933
    Neuron replied

    Hi,

    You can upload all the photos and then tell us to sent you the code for fixing that.

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thank you, everything has been added and updated.

  •  933
    Neuron replied

    You are welcome anytime, feel free to ask for anything you need

    If you like our theme, please leave us a rate with 5 stars at ThemeForest, that would help us a lot.

    Kind Regards,
    NeuronThemes


  •   ctangmo replied privately
  •   Neuron replied privately
  •   ctangmo replied privately
  •   Neuron replied privately
  •   ctangmo replied privately
  •   Neuron replied privately