Changing font color size?

  • Profile Image
    mikewilson81
    Asked on January 31, 2012 at 01:56 PM

    Is there any way to change the font color and size on the bottom of a box?  Like on the name or phone number tool, the descriptive text below the box, not above?

  • Profile Image
    abajan
    Answered on January 31, 2012 at 03:00 PM

    Injected CSS can be used to change the properties of the sub labels. The class for those is form-sub-label. So, as an example, if you wanted to change the font color and size of all of the sublabels in a particular form to "red" and "80%" respectively, the following rule would be sufficient:

    .form-sub-label {
    color: red;
    font-size: 80%;
    }

    However, styling each sublabel independently would require the inclusion of each field's ID in the selector as in this form where the following rules were used:

    #id_1 .form-sub-label {
    color: red;
    font-size: 80%;
    }

    #id_3 .form-sub-label {
    color: #60F;
    font-size: 12px;
    }

    #id_4 .form-sub-label {
    color: #060;
    font-size: 0.9em;
    }

    Of course, additional declarations could have been included in each rule to style other properties like weight and variant.

    You can find out which ID belongs to which element by viewing the form's source but a tool like Firebug simplifies such tasks.

  • Profile Image
    uritcan
    Answered on June 01, 2012 at 02:59 AM

    It would be a lot easier if we could add font by the HEX code at the bottom :-(