Form background is zoomed in on mobile

  • bethisenergy
    Asked on September 2, 2024 at 7:45 PM

    Two issues are occurring:

    On the desktop version, the background image remains fixed in one spot and doesn't scroll down with the form.

    On the mobile version, the background image appears completely zoomed in and doesn't display as intended.

    Form background is zoomed in on mobile Image 1 Screenshot 20

    Jotform Thread 18582301 Screenshot
  • Raymond JotForm Support
    Replied on September 2, 2024 at 10:18 PM

    Hi Elizabeth,

    Thanks for reaching out to Jotform Support. When I cloned and tested your form, everything worked the way it was supposed to. Take a look at the screenshot below to see my results:

    Form background is zoomed in on mobile Image 1 Screenshot 20

    I cleared your form's cache which should help. Can you go ahead and try it again and let us know how it goes? If the same thing happens again, please let us know the type of device and browser you're using and we'll investigate it more to see if we can figure out what's going on.

    Give it a try and let us know if you need any help.

  • Elizabeth
    Replied on September 2, 2024 at 10:20 PM

    I tried it again! I’m using an iPhone 14. When I preview it from jotform it looks great. But when I click the link through my phone it zooms in again.

  • Raymond JotForm Support
    Replied on September 2, 2024 at 10:40 PM

    Hi Elizabeth,

    Please replace your form's existing CSS codes with a new one. Let me walk you through it:

    1.First, copy the codes below:

    /* fix bg in mobile ios - 18582301*/

    @media screen and (max-width: 480px){
      body {
       position: relative;
     }
      
      .form-all {
       position: absolute;
       height100vh;
       width100vw;
       top0;
       overflow: scroll;
       margin-top0;
     }
    }
    /* Ends here */

    2.In Form Builder, click on the Paint Roller icon on the right.

    3. Under the Styles tab, paste the codes, replacing the existing ones, into the Inject Custom CSS box.

    Form background is zoomed in on mobile Image 1 Screenshot 30

    Here's how it would appear:

    Form background is zoomed in on mobile Image 2 Screenshot 41

    Feel free to test this cloned demo form or clone it to your account to inspect it further. We also have a guide on How to Inject Custom CSS Codes that you can check out.

    Give it a try and let us know if you need any help.

  • bethisenergy
    Replied on September 2, 2024 at 10:43 PM

    This looks great!! Thank you so much.

    And what about the desktop version? I'ts not showing the whole picture just a portion of it.

  • Raymond JotForm Support
    Replied on September 2, 2024 at 11:02 PM

    Hi Elizabeth,

    Please update the codes with the following:

    /* fix bg in mobile ios - 18582301*/

    @media screen and (max-width: 720px){
     body {
      position: relative;
     }
    .supernova {
      background-attachment: fixed !important;
    }
     .form-all {
      position: absolute;
      height: 100vh;
      width: 100vw;
      top: 0;
      overflow: scroll;
      margin-top: 0;
     }
    }
    .supernova {
     background-repeat: no-repeat;
     background-attachment: unset;

    }

    Note that the background on the desktop may appear zoomed in as the background tries to stretch it to the length of your form.

    Reach out again if you need any help.

  • bethisenergy
    Replied on September 2, 2024 at 11:03 PM

    Should I delete the previous Code that you sent before or just add this one as well>?

  • Raymond JotForm Support
    Replied on September 2, 2024 at 11:06 PM

    Hi Elizabeth,

    This replaces the existing codes in your form. You can also test it on this link.

    Reach out again if you have any questions.

  • bethisenergy
    Replied on September 2, 2024 at 11:12 PM

    okay this is great. last thing! Mow my email question, the boxes are shrunken down. See below. How do make it more aligned with the rest of the boxes or bigger?Form background is zoomed in on mobile Image 1 Screenshot 20 Screenshot 10
  • Raymond JotForm Support
    Replied on September 2, 2024 at 11:20 PM

    Hi Elizabeth,

    To avoid confusion, I answered your other question on a new thread. You can go ahead and check that out here

    Reach out again if you need any help.

Your Answer