How to align the drop down fields properly on mobile device?

  • Jack1st
    Asked on March 20, 2017 at 8:44 AM

    Hi,

    I have an issue regarding the width of my dropdown menus in the form GP d'Australie. It is OK on Safari on my Mac, but not on the iPhone... <the drop down menu and the label are not on the same line or the dropdown menu is shriked. I have these forms since years and never has a problem before. 

    What can I do ??'

    Thanks for your help.

    Best regards,

    Jacques

    Jotform Thread 1096169 Screenshot
  • Kiran Support Team Lead
    Replied on March 20, 2017 at 11:14 AM

    Since the form is optimized to mobile devices, the dropdowns are adjusted to the size of the screen and so the labels are moved to the top of the input field. In order to display the label to the left of the dropdown, you may inject the following CSS code to the form along with aligning the label to right of the input field.

    How to align the drop down fields properly on mobile device? Image 1 Screenshot 20

    @media only screen and (min-device-width: 320px) and (max-device-width: 736px) {

    li[data-type="control_dropdown"] > div.form-input {

        width: 83% !important;

    }

    }

     

    Please get back to us if you need any further assistance. We will be happy to help. 

  • Jack1st
    Replied on March 21, 2017 at 3:09 AM

    Hi Kiran,

    Thanks for your answer. It works.
     
    But, how to solve the difference of alignement of the dropdown between rows 1-9 and row 10 which is a bit on the right.
     
    Only on the iPhone
     
    Thanks for your reply.
     
    Best regards,
     
    Jacques
     
     
     
  • Nik_C
    Replied on March 21, 2017 at 8:37 AM

    Hello Jacques,

    The problem occurred because the number 10 is with two digits. So to align it properly please add the below CSS code to the existing one:

    @media only screen and (min-device-width: 320px) and (max-device-width: 736px){

        li[data-type="control_dropdown"] > div.form-input {

            width : 83% !important;

        }

      #cid_15{ 

      width:82%!important;

      margin-left:-9px;

      }

    }

    So just copy the green part of the code.

    How to align the drop down fields properly on mobile device? Image 1 Screenshot 30

    It will work like this on iPhone:

    How to align the drop down fields properly on mobile device? Image 2 Screenshot 41

    Let us know how it worked for you.

    Thank you!

  • Jack1st
    Replied on March 21, 2017 at 10:04 AM

    Thanks, it works !

    But, is there any possibility to align the dropdowns on the right side ???

     

     

  • Kiran Support Team Lead
    Replied on March 21, 2017 at 12:16 PM

    You may add float: right; after the width section in the code provided as shown in the code below: 

    @media only screen and (min-device-width: 320px) and (max-device-width: 736px){

        li[data-type="control_dropdown"] > div.form-input {

            width : 83% !important;

            float: right;

        }

    Let us know if you need any further assistance. We will be happy to assist.