How to change the CSS Style of one sub-label with no id? - RESOLVED

  • AA_C
    Asked on December 28, 2016 at 10:12 AM

    Hi,

    How do I in inject css code to stylize one of my forms sub labels; form 60965567853976

    There is no id for the sub-label;

    Here is the

    code line:

     

     

    class="form-line form-line-column form-col-2 jf-required" data-type="control_textbox" id="id_27">
     class="form-label form-label-top" id="label_27" for="input_27">  
     Dog's AAC ID number   class="form-required">   *      
     
    id
    ="cid_27" class="form-input-wide jf-required">   class="form-sub-label-container" style="vertical-align: top;">
     
     type="text" class=" form-textbox validate[required, Numeric]" data-type="input-textbox" id="input_27" name="q27_dogsAac" size="4" value="" maxlength="4" />  
     class="form-sub-label" for="input_27" style="min-height: 13px;"> REQUIRED - - - - REQUIRED  
           

    I want the line REQUIRED - - - - REQUIRED to be color:#dd0055

    I tried using;

    #input_27 { color:#dd0055; } Made the inputted text red

    #cid_27 { color:#dd0055; } Didn't work

    .form-sub-label { color:#dd0055 !important; } Made all the sub-labels red.

    How do I do this without an id for the sub-label ?

    Thanks,

    Regards
    Robert
    AAC

  • AIDAN
    Replied on December 28, 2016 at 10:35 AM

    Hi Robert, thank you for contacting us.

    Please use this custom CSS code to achieve what you're after:

    #input_27 + label.form-sub-label {

        color: #dd0055;

    }

    For completeness, I created a corrected form if you would like to clone ithttps://www.jotform.com/63623957859979

    If you need further assistance please let us know. We'll be happy to help.

  • AA_C
    Replied on December 28, 2016 at 1:13 PM

    Hi,

    I used the supplied code now all is good. Also I just learned something new about applied css.

    Thank you,

    Regards
    Robert
    AAC