How to centralise fields one on mobile devices in landscape mode?

  • ipbr21054
    Asked on March 11, 2016 at 6:14 PM

    Hi,

    Here is the form in question https://form.jotformeu.com/60705884010349

    Ive managed to change a few things to what I require to use but unable to center fields and the text above fields to the page. 

    Im currently viewing the form on iPhone & iPad but Im seeng a slightly different view in portrait or landscape on both devices & would be nice to at least look the same.

     

    Is it possible please for you to advise me the code & where to put it or make the edit for me so......

    Fields are central to screen whether portrait/landscape & iPhone/iPad is used. 

    Text about each field is also central to screen whether portrait/landscape & iPhone/iPad is used. 

     

    Many Thanks.

  • David JotForm Support Manager
    Replied on March 11, 2016 at 6:46 PM

    I checked your form and it does show centered:

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

    What is not centered according to you? Could you please share a screenshot to illustrate what you mean?: https://www.jotform.com/answers/277033-How-to-add-screenshots-images-to-questions-in-support-forum 

  • ipbr21054
    Replied on March 11, 2016 at 7:18 PM

    The questions are to the left of screen. 

    The input fields are to left of screen. 

     

    Make EVERYTHING central to screen. 

     

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

  • ipbr21054
    Replied on March 11, 2016 at 7:25 PM

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

  • Kevin Support Team Lead
    Replied on March 11, 2016 at 9:27 PM

    You may try injecting this CSS code: 

    #id_19, #id_16, #id_20, #id_21, #id_22{

        margin-left:20%;

    }

    Or also making your form mobile responsive, this guide will help you to achieve it: http://www.jotform.com/help/311-How-to-make-Forms-Mobile-Responsive

  • ipbr21054
    Replied on March 12, 2016 at 6:35 AM

    Hi,

    I tried that but not what i was look for.
    However i just need to centralise the text "YOUR NAME / YOUR MESSAGE" etc etc over the respective field.

    I injected css text-align:center; but had no affect at all ?

     

  • Nik_C
    Replied on March 12, 2016 at 7:31 AM

    To center the labels in your form you will have to inject the following CSS code:

    .form-label{

    text-align:center!important;

    }

    To inject the custom CSS code to the form you need to go to Preferences. In the preferences choose Form styles and add the custom CSS code i provided to the Inject custom CSS field.

     

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

    Hope this helps

  • ipbr21054
    Replied on March 12, 2016 at 10:39 AM

    Hi,

    Very strange.

    I injected the code like advised and can see it alter no problem.

    I saved the edit and viewed it on my page.

    I have noticed with the text centered my submit button changes from red to grey/silver.

  • Ashwin JotForm Support
    Replied on March 12, 2016 at 11:25 AM

    Hello ipbr21054,

    I did check your form and it seems to display the labels centre aligned correctly. Please check the screenshot below:

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

     

    Have you embedded your form in any webpage where you are having this issue with? Please share the web page URL and we will take a look.

    We will wait for your response.

    Thank you!

  • Ian
    Replied on March 12, 2016 at 11:51 AM

    The text is Center correct. 

    Since injecting the code I noticed the submit button changed from red to silver. 

    I have now fix the fault. 

  • ipbr21054
    Replied on March 12, 2016 at 11:53 AM

    I applied the same code to my other form but the drop down field will not Center. 

    It can be seen here http://form.jotformeu.com/form/60712393428355?partNumber=Mazda005 

  • Nik_C
    Replied on March 12, 2016 at 12:26 PM

    It doesn't work since the CSS that you injected is for text alignment, it doesn't hit drop-down.

    For drop-down field please inject this CSS:

    .form-input-wide.jf-required {

        margin:auto;

    }

    It will look like this after injecting CSS:

    How to centralise fields one on mobile devices in landscape mode? Image 1 Screenshot 20

    Hope it helps!

    Do get back to is if it doesn't.

  • ipbr21054
    Replied on March 12, 2016 at 1:22 PM

    Perfect thanks

  • Nik_C
    Replied on March 12, 2016 at 1:37 PM

    You're welcome.

    I'm glad it worked for you!

    Best regards.