File Upload Buttons Look Different In Firefox

  • IMCWOW
    Asked on April 28, 2016 at 4:03 PM

    In chrome and safari y file upload buttons look great but in firefox the button is flipped to the left side and extends down. Why does it display like this?

    File Upload Buttons Look Different In Firefox Image 1 Screenshot 20

    Jotform Thread 828836 Screenshot
  • Huberson
    Replied on April 28, 2016 at 5:17 PM

    This height of the upload button is from the CSS code added to the from, specifically the 279px height.

    /* Image upload */

    .form-upload {

        width : 190px;

        height : 279px;

        background-image : url('http://imgur.com/ND8Z4dR.jpg');

        text-align : center;

    }

    While Chrome ignore that height for the button, Firefox does not.

    You can remove or comment out the /* Image upload */ block entirely and add the below CSS to have the desired style across both Firefox and Chrome.

    #label_3, #label_4 {

        display : block;

    }

     

    #input_3, #input_4 {

        position : fixed;

        top : 318px;

    }

     

    #label_3, #label_4 {

        width : 190px;

        height : 279px;

        background-image : url('http://imgur.com/ND8Z4dR.jpg');

        text-align : center;

    }

     

    Modified clone can be viewed here: https://form.jotform.com/61186968416972

  • IMCWOW
    Replied on May 2, 2016 at 4:23 PM

    Thanks for the response on this, your solution worked but there are a few things that didn't look great. Since the background image is now in the label, am I able to erase the label but still have that field with a name? To clarify, when I submit this form and receive an email, what will show in the label of that field? 

    The next thing is that because the button is now fixed, it now does not sit in place. It scrolls with the page. I've attached a gif to show you.

    File Upload Buttons Look Different In Firefox Image 1 Screenshot 20

  • Huberson
    Replied on May 2, 2016 at 6:23 PM

    If you look at my clone you will notice that there is no labels displaying for any of those fields - https://form.jotform.com/61186968416972.

    You need to remove the text from Form Builder if you do not want them to be visible.

     

    For fields label in email, you can always modify the content of the notification and add the texts you want for those fields' label. 

    Setting-Up-Email-Notifications

     

    To prevent the upload field to remain fixed while the page scrolls: 

    REPLACE

    #input_3, #input_4 {

        position : fixed;

        top : 318px;

    }

    BY

    #input_3, #input_4 {

        position : absolute;

        top : 9px;

    }

  • IMCWOW
    Replied on May 4, 2016 at 9:09 AM

    Thanks for the response and the help. Unfortunately I had to rearrange the form and ended up with this solution: 

    #input_3, #input_4 {

        width : 190px;

        padding-bottom : 279px;

        background-image : url('http://imgur.com/ND8Z4dR.jpg');

        text-align : center;

    }

     

    #id_3, #id_4 {

        text-align : center;

    }

     

    Rather than giving the input a height of 279px, I used a padding of 279px. This seemed like the best option that doesn't affect the button but still allows the background to show.

  • Charlie
    Replied on May 4, 2016 at 10:23 AM

    No worries, as long as the custom CSS code you are using works best for you. 

    I presume everything is good in your end now? Should you need more assistance on this, please let us know. Thank you.