Centering text boxes on form

  • Koaching
    Asked on August 11, 2025 at 10:13 AM

    Hello,

    I am having trouble figuring out how to center text boxes on a form (yes, the text itself should also be center)

    Centering text boxes on form Image 1 Screenshot 20

  • Mikhail JotForm Support
    Replied on August 11, 2025 at 10:51 AM

    Hi Koaching,

    Thanks for reaching out to Jotform Support. To center the text boxes and the text itself, you can add a CSS code to your form. Let me show you how it's done:

    1. First, copy this code:

    /* Center align the Short Text elements - 29921751 */
    div#cid_87,div#cid_82,div#cid_55 {
      margin: auto;
      width: 50%;
      padding: 10px;
    }

    label#label_87,label#label_82,label#label_55 {
      text-align: center;
    }


    2. Open your form in Form Builder and click on the blue Paint Roller icon on the right side of the screen.

    3. Under the Styles tab, paste the code below into the Inject Custom CSS area.

    Centering text boxes on form Image 1 Screenshot 30

    This is what it looks like after adding the CSS code:

    Centering text boxes on form Image 2 Screenshot 41

    Give it a try and let us know how it goes.


Your Reply