How can I center my form on mobile devices?

  • mike1444
    Asked on October 13, 2017 at 10:48 PM

    Hello.  I've read a lot of forums about centering the form on mobile and tried several css suggestions.  Can you take a look and see what I'm doing wrong?  I'm viewing the form on a Galaxy S3 and it has no left margin.  (*See screenshot and thanks in advance!)

    Jotform Thread 1273177 Screenshot
  • John_Benson
    Replied on October 13, 2017 at 11:40 PM

    To center the form when viewing it on mobile device, please add this custom CSS code:

    @media screen and (max-width: 923px)

    .jotform-form .form-all {

        width: 100% !important;

    }

    Here's a guide on: How-to-Inject-Custom-CSS-Codes

    Here's the result on my cloned form:

    1507952390teztgaz Screenshot 10

  • mike1444
    Replied on October 14, 2017 at 12:01 AM

    I've injected the code.  It hasn't solved the problem but I noticed as the page loads the logo image seems to "push" the form to the left.  

  • mike1444
    Replied on October 14, 2017 at 12:10 AM

    Here is the mobile preview on jotform.com after injecting the css.

    1507954195mobile preview Screenshot 10

  • John_Benson
    Replied on October 14, 2017 at 2:09 AM

    Sorry for the confusion. 

    The custom CSS code that I have provided is missing a bracket. To fix it, please remove the previous custom CSS code and replace it with this:

    @media screen and (max-width: 923px)

    {

    .jotform-form .form-all {

        width: 100% !important;

    }

    }

    Here's my screen capture result:

    1507959922zzar Screenshot 10

    I hope this helps. If you have any questions, please contact us again.

  • mike1444
    Replied on October 14, 2017 at 8:36 AM

    Thanks John! Works perfectly.  Based on all the forums I've visited your support team is awesome!  

  • Elton Support Team Lead
    Replied on October 14, 2017 at 10:04 AM

    We are happy to hear it and thanks for the compliments.

    Cheers! :)