How to increase the width of fields on mobile view with CSS?

  • KeysMarketing
    Demandé le 9 janvier 2025 à 07:55

    Je pensais qu'on etait sauvè mais il reste encore un probleme, sur mobile l'affichage est pas bon, comment faire pour ameliorer ca svp ?

    Generer du code css pour agrandir ma case telephone Image 1 Screenshot 20 Screenshot 10

    c'est le formulaire appelé Pixalie.

    https://form.jotform.com/250074630012239

    Merci de ne pas le modifier, vous pouvez faire vos tests avec un clone svp ?

    sur ordinateur il est parfait cest juste sur mobile ou ca ne va pas.

    Merci beaucoup pour votre aide


  • Vincenzo Jotform Support
    Répondu le 9 janvier 2025 à 08:21

    Hi Keys,

    I just wanted to remind you that I'll be helping you in English using Google Translate because our French Support agents are busy helping other Jotform users right now, and you can reply in whichever language you feel comfortable using. But, if you'd rather have support in French, let us know and we can have them do that. But, it might take a while until they're available again.

    Now, coming back to your question, increasing the width of the email and phone number fields on your form for the mobile view is easy. You will just need to inject a custom CSS code. Let me walk you through it:

    1. First, copy this code:

    /* Code to increase the width of the email and phone number fields on mobile view - 22863051 */
    @media only screen and (max-width: 480px) {
    #id_8, #id_5 {
        display: contents;
    }
    #input_8, #input_5 {
        margin-bottom: 10px !important;
    }
    }
    /* Code Ends Here */

    2. In Form Builder, click on the Paint Roller icon on the right side of the page to open Form Designer.

    3. Now, in the Form Designer menu, click on the Styles tab, scroll down and paste the code into the Inject CSS Code box. That’s it. The code is automatically saved.

    How to increase the width of fields on mobile view with CSS?  Image 1 Screenshot 30

    Result:

    How to increase the width of fields on mobile view with CSS?  Image 2 Screenshot 41

    Here you can test this demo form or clone it to better understand how it was configured. 

    Give it a try and let us know how it goes.

  • KeysMarketing
    Répondu le 9 janvier 2025 à 09:23

    Ca fonctionne merci, on a reussi !