Why are the labels squished towards the left of the fields?

  • Profile Image
    kkhan
    Asked on April 17, 2017 at 12:02 PM
    3. I specified the label of the text boxes to be on top of the box, and they appear that way in builder; but when I go to designer or preview, the text above the box is left. Don't understand why since I selected top.
  • Profile Image
    Jim_R
    Answered on April 17, 2017 at 12:05 PM

    The labels are indeed set to be aligned TOP when I checked your form. Although the labels show up at the top of each field as intended, they appear squished towards the left. I assume that's what you meant when you said "the text above the box is left".

    The reason why your labels behave that way was because of their widths. They are too narrow compared with the width of the fields they are associated with.

    To fix this, just add the following CSS codes to your form:

    .form-label {

        width: 100% !important;

    }

    Complete guide: How-to-Inject-Custom-CSS-Codes

    Result: https://www.jotform.com/71064436438962 (cloned copy)

     

  • Profile Image
    kkhan
    Answered on April 17, 2017 at 01:45 PM
    Well, that was easy. Still trying to get used to V4.
    Thanks!
    Karen
    ___________________________________________________________________
    Karen Khan | Assistant Secretary of the Corporation | University Policy Coordinator | Carnegie Mellon University
    5000 Forbes Avenue | 427 Warner Hall | Pittsburgh, PA 15213 | o: 412.268.1275 c: 412.600.4318
    kkhan@andrew.cmu.edu
    ...
  • Profile Image
    Jim_R
    Answered on April 17, 2017 at 02:19 PM

    Glad it helped. Although the guide I'm about to link below is not directly related to your question, it's still worth mentioning as it will give you some idea about the importance of field label positioning and how the fields and labels automatically adapt with the entire form width.

    So if you could spare some time in the future, just head over to this guide: Setting-up-Form-Columns 

    Enjoy your day! 😊

  • Profile Image
    kkhan
    Answered on April 17, 2017 at 02:45 PM
    Thanks, Jim. Every little bit helps.
    Karen
    ___________________________________________________________________
    Karen Khan | Assistant Secretary of the Corporation | University Policy Coordinator | Carnegie Mellon University
    5000 Forbes Avenue | 427 Warner Hall | Pittsburgh, PA 15213 | o: 412.268.1275 c: 412.600.4318
    kkhan@andrew.cmu.edu
    ...