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

    Centering A Form Using DIV

    Asked by Barkley on July 02, 2013 at 09:17 AM

    If you click on "Free Changes" you will see what Iam trying to accomplish in the included URL

    I have to copy jotform source code into my web page so I can include the following java script in my web page:


    <!-- ******** BEGIN LIKNO WEB MODAL WINDOWS CODE FOR LMStoreWindow ******** -->

    <script type="text/javascript">var lwmwLinkedBy="LiknoWebModalWindows [1]",lwmwName="LMStoreWindow",lwmwBN="260";</script><script charset="UTF-8" src="//www.foxmls.com/likno-scripts/LMStoreWindow.js" type="text/javascript"></script>

    <!-- ******** END LIKNO WEB MODAL WINDOWS CODE FOR LMStoreWindow ******** -->

    I have tried to center the form, not the text, with:  <div style="width:100%; margin: 0 auto;"> but it does not work.
    I cannot use Iframe as I have no way of injecting my javascript into the Jotform page.
    Any suggestions?
    Page URL:

  • Profile Image

    Answered by jefreylandicho on July 02, 2013 at 09:33 AM

    The div style should be 700px not 100% as when you used 100%, the div size will occupy the entire space.


    <div style="width:700px; margin: 0 auto;"> or <div style="max-width: 700px; width:100%; margin: 0 auto;">


    If you need further assistance, please contact us again

  • Profile Image

    Answered by Barkley on July 02, 2013 at 09:55 AM
    Thank you.

  • Profile Image

    Answered by Barkley on July 02, 2013 at 09:57 AM
    Is there any method to insert javascript into a form?

  • Profile Image

    Answered by sidharth_kch on July 02, 2013 at 10:07 AM


    Unfortunately, you can't add javascript code within JotForm editor. If you need to add javascript code to your form, the only option is to download your form's source code and add the javascript code.

    Please refer this guide: How to get your Form Source Code

    Let us know if you need further assistance.