Okay
  Public Ticket #3497115
Parallax image
Closed

Comments

  •  6
    Mickel started the conversation

    Hey there,

    I'm back once more :-(

    I'm really hoping this will be the final round of questions. I apologize for bombarding you. Unfortunately, I'm having trouble with the parallax image (Serano image parallax and with the shortcode 'has-parallax'. I've included two examples for reference:

    1. Desktop page scaled down to mobile.
    2. Fresh load on mobile.

    It's crucial that the image maintains its proportions correctly.

    Thanks!
    Mick

    Attached files:  example2.mp4
      example1.mp4

  •  1,823
    Support replied

    Hello Mickel,

    I see, let me escalate this to our web designer.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  1,823
    Support replied

    Hello,

    I've noticed that Elementor is overwriting the image styles. In this case, please add the following additional CSS:


    .has-parallax-content > img {
      height: 100% !important;
    }

    Adding this CSS should help you maintain the desired image styles despite Elementor's interference.

    Best regards


    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  6
    Mickel replied

    Hi!

    I'm still experiencing an issue with the functionality. When I adjust the browser size, the parallax images maintain their proportions about 99% correctly. Please review the top and bottom sections while scrolling on mobile (refer to the provided video example).

    Upon refreshing the entire page, the 'div container with the parallax image' expands to full-screen (screen height). This behaviour is not desired. I would like it to maintain its original proportions. The image should fill the entire container div. It seems to be behaving similarly to the hero section. I specifically want the parallax effect to be applied only to the image without it taking up the entire screen...just maintaining its original proportions.

    See this page for reference - https://beta.bigpitcher.nl/nike-deals/

    Thanks in advance! 👍

    Attached files:  example3_1.mp4

  •  1,823
    Support replied

    Hello,

    Our shortcode for parallax images uses full-screen height on various viewport devices. This is because the image sizes may vary in load time, and the JavaScript is executed first, needing to calculate the translation proportions accurately; otherwise, it may cause unpredictable jumping. To address this for mobile devices, you can define an additional class for landscape images and set a specific height as needed. Auto height won't work due to the JavaScript involved in the parallax effect. Here's how you can create a new class with various heights:

    Please add the following additional CSS:


    @media only screen and (max-width: 1024px) {
    .half-height figure.has-parallax {
        height: 70vh!important;
    }
    }

    @media only screen and (max-width: 767px) {
    .half-height figure.has-parallax {
        height: 60vh!important;
    }
    }

    @media only screen and (max-width: 479px) {
    .half-height figure.has-parallax {
        height: 50vh!important;
    }
    }

    Please keep in mind that the images translate from top to bottom by 20% of their height. In this case, we recommend using square images to ensure the best appearance without revealing the background of the parallax div container.

    PS: I've created a new set of parallax images on your example page using the new class and styles.

    If you have any further questions or need assistance, please don't hesitate to ask.

    Best regards




    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  6
    Mickel replied

    Super thanks again! Awesome!!!