Is it possible to center align a text box?

  • FRJotform
    Asked on May 12, 2017 at 9:07 AM

    Is it possible to center align a text box (the object, not the text within it) rather than it always being aligned to the left of the page?

    Is there some custom CSS that I could use for this?

    I have previously done this by setting the width of the box and then changing the margin it's aligned against but this isn't really suitable for my uses.

     

  • amy
    Replied on May 12, 2017 at 10:31 AM

    Hi,

    First of all, I would like to recommend you to shrink the text box. You can shrink it by clicking on "Properties" and then going to the "Advanced" tab. 

    Is it possible to center align a text box? Image 1 Screenshot 50

    Then please find the ID of the field on the same page by clicking on the "Field Details" button:

    Is it possible to center align a text box? Image 2 Screenshot 61

    Is it possible to center align a text box? Image 3 Screenshot 72

    Finally, please inject this custom CSS code to your form. Please don't forget to change the field ID. You can also change the value of the margin according to your own preference:

    #input_22 {

    margin-left: 85%;  

    }

    How to Inject Custom CSS Codes

    The result:

    Is it possible to center align a text box? Image 4 Screenshot 83

    Please send us further details such as the form URL etc. if you cannot succeed this way.

    Thank you.

    All the best!