I have removed labels, but how do I delete the space where the label was?

  • snaplash
    Asked on June 9, 2017 at 10:59 AM

    I have removed labels from my form using:

     

    .form-label.form-label-top {

        visibility : hidden;

    }

     

    How do I remove the space where the label was?

     

    Thank you in advance.

     

    M.

  • Kevin Support Team Lead
    Replied on June 9, 2017 at 1:08 PM

    I would suggest you to use the display property instead, this will completely remove the label element from the layout instead of just hiding it and leaving its space.

    .form-label.form-label-top {

          display: none; 

    }

    Hope this helps. 

     

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

    That works great! Thanks!

     

    Would I use something different for the file upload fields? They seem unaffected by that css?

  • Kevin Support Team Lead
    Replied on June 9, 2017 at 3:37 PM

    I have checked your form and I can see the code was applied to the file upload fields too: 

    I have removed labels, but how do I delete the space where the label was? Image 1 Screenshot 30

    However, seems like there is some padding at the bottom of each field, please try injecting the following code in order to get rid of it: 

    [data-type="control_fileupload"]{

        padding-bottom: 0px;

    }

    Expected result. 

    I have removed labels, but how do I delete the space where the label was? Image 2 Screenshot 41

    Hope this helps.