How to apply CSS styles only to some HTML elements in the form?

  • Keithy
    Asked on April 1, 2016 at 1:06 PM
    Also, in the example from above, if I edit the CSS code, does that apply to ALL form labels? What if I have some that I want to show?
  • Kevin Support Team Lead
    Replied on April 1, 2016 at 1:15 PM

    Yes, the code provided by Beril above will affect all the labels in your form, if you want to affect only some fields then you will need to get the ID of that field and then apply the CSS code, to get the ID of the label that you want to affect you can only need to click on the right button of your mouse and then click on inspect, this over the label that you want to hide.

    How to apply CSS styles only to some HTML elements in the form? Image 1 Screenshot 30

    The developers tool will be displayed, you only need to copy the value in the id attribute in the label. 

    How to apply CSS styles only to some HTML elements in the form? Image 2 Screenshot 41

    Then you will be able to hide only the labels that you want, below is a sample code that you would need to use in order to hide more than one label:

    #label_1, #label_2, #label_3{

     display: none;

    }

    This will help you to achieve what you want, this guide will help you to inject the code in your form: http://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes