How can I center the Form Collapse to fit all devices?

  • snaplash
    Asked on June 9, 2017 at 11:04 AM

    The form collapse looks great on my phone when portrait, but when it is turned horizontal, it exceeds the screen.

    Right now, I am using:

     

    .form-collapse-table {

        width : 90%;

    }

     

    which works, but is not the same width as the Submit Button at width:100%; however its not quite right.

     

    Could you help please?

     

    M.

  • Nik_C
    Replied on June 9, 2017 at 1:18 PM

    I tested your form on iPhone 6 and iPhone 7 and on Samsung Note 3 and the form is showing fine:

    How can I center the Form Collapse to fit all devices? Image 1 Screenshot 20

    On which device did you test your form?

    Also, is the form embedded in a website or you're testing it directly?

    We'll wait for your response.

    Thank you!

  • snaplash
    Replied on June 9, 2017 at 2:49 PM

    I am testing on a Galaxy S3, directly to the address and using the:

    width:90%;

    seems to work, but the width of the form collapse fields are different than the Process Video button

  • Nik_C
    Replied on June 9, 2017 at 3:07 PM

    I tested on S3 simulator and I was able to replicate this issue:

    How can I center the Form Collapse to fit all devices? Image 1 Screenshot 20

    I will try to find a CSS that will affect that field, but this could be related to the default Browser in Samsung S3.

    I will get back to you through this thread.

    Thank you!

  • Nik_C
    Replied on June 11, 2017 at 1:38 PM

    Thank you very much for your patience.

    I tried to find the right CSS, so could you please try pasting the below CSS in your Custom CSS Field of the form:

    @media only screen 

    and (max-device-width: 1280px)

    and (orientation: landscape){

    .form-submit-button {

        width: 580px!important;

        margin-left:-155px!important;

    }

    }

    I tested on Nexus 4 since it is a similar resolution and I had hard time accessing the Galaxy s3 emulator and it should look like this:

    How can I center the Form Collapse to fit all devices? Image 1 Screenshot 20

    Please test and let us know how it worked for you.

    Thank you!