How do I keep the background image static in a form and just have the form scroll?

  • bobbyh
    Asked on March 9, 2017 at 3:19 PM

    When I select a theme for my form I can preview it and the background will not move, but the form will scroll over top of the image. However, when I change the image, the background scrolls and repeats itself while scrolling through the form. How can this be fixed?

    Jotform Thread 1087202 Screenshot
  • candy
    Replied on March 10, 2017 at 3:01 AM

    Hello,

    You can inject the following CSS code to your form in order to make the background fixed and scroll only the form:

    html {

       background-attachment: fixed !important;

    }

    I have cloned your form and tested, it is working as you can see it at the following URL: https://form.jotformpro.com/70681884195973 

    Thanks.

  • bobbyh
    Replied on March 10, 2017 at 9:18 AM

    That fixed it for the form on the computer, but messed up the form for mobile... is there a way to make it work on both mobile and desktop?

  • candy
    Replied on March 10, 2017 at 10:36 AM

    Hello again,

    I have checked the form on my Android mobile device and I have seen that some of the fields seem like broken.

    Let me some time to investigate the issues further.

    Thanks.

  • candy
    Replied on March 10, 2017 at 10:51 AM

    Hello,

    I did some adjustments on the form and the form seems good on mobile devices now as you can see the screenshot below:

    How do I keep the background image static in a form and just have the form scroll? Image 1 Screenshot 30

    Please mark the following options as you can see in the screenshot below and save it in Advanced Designer:

    How do I keep the background image static in a form and just have the form scroll? Image 2 Screenshot 41

    Please try and let me know about the results.

    Thanks.

  • bobbyh
    Replied on March 10, 2017 at 11:17 AM

    that fixed the form. I also had to turn off the option to shrink. the only thing I would love to fix at this point is that the image in the background is stretched throughout the entire form and scrolls with the form on mobile. Is there a way to make this a static image in the mobile version like the desktop version?

  • Mike_G JotForm Support
    Replied on March 10, 2017 at 3:22 PM

    I would like to apologize for any inconvenience, however, I can't seem to reproduce the issue you're having after I made some test on an Android and iOS devices. Any specific phone you are using where you are encountering the issue you described? Also, if possible, please provide us a screenshot of the issue so we can try to reproduce it on our end.

    How-to-include-screenshot-image-in-the-support-forum

    We will wait for your response.

    Thank you.

  • bobbyh
    Replied on March 10, 2017 at 3:31 PM

    How do I keep the background image static in a form and just have the form scroll? Image 1 Screenshot 30How do I keep the background image static in a form and just have the form scroll? Image 2 Screenshot 41

    See how the image is stretched out behind the form? 

  • Mike_G JotForm Support
    Replied on March 10, 2017 at 5:01 PM

    Thank you for the additional information. Please allow me some time to test everything and I will get back to you as soon as I have the resolution to your issue.

    Thank you.