What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How can I set a different top margin for mobile devices?

    Asked by pilgrimparking on January 17, 2017 at 02:40 PM

    At first I needed a way to reduce the extra space at the top of my form for embedding purposes for my company's website.  I found the working solution of adding the following to my CSS code in the Design window:

    .form-all {

        padding-top : 0;
        margin-top : -60px;
    }

     

    It works, except for one issue: the top little bit of my form being cut off when viewed on a mobile device.

    Is there any way to code it so that it reduces the top margin by less on mobile devices?

    P.S. The "Mobile Responsive" widget did not help.

    Page URL:
    https://form.jotform.com/63354344210143

  • Profile Image
    JotForm Support

    Answered by EltonCris on January 17, 2017 at 04:52 PM

    It's easy but that CSS code isn't the right way to do it.

    First, remove that CSS codes in your form and use the following.

    .form-all, .jotform-form{

    padding-top:0 !important;

    }

    This should get rid of the top spacing of the form without any cut off on mobile or desktop.

    Hope this helps!

  • Profile Image

    Answered by pilgrimparking on January 17, 2017 at 05:21 PM

    That worked, thanks!