What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Simulating sub-label line breaks with CSS - RESOLVED

    Asked by AA_C on January 18, 2017 at 01:50 PM

    I have a long line of text for a sub-label. I would like to break into two lines similar to what I show below

     From

    On a Nom qui apparaît sur le certificat. Maximum 20 caractèresform 

     To

    On a Nom qui apparaît sur le certificat.
    Maximum 20 caractèresform 
         

    I can't insert a <br /> to do this, so what injected css code will accomplish it?  

    Thank you,

     

    Regards
    Robert
    AAC

  • Profile Image
    JotForm Support

    Answered by Mike on January 18, 2017 at 03:05 PM

    There is no direct way to add line breaks with CSS, but it might be possible to use :after and :before pseudo-elements to get 2 or 3 separate lines of the text.

    For example, add the 'On a Nom qui apparaît sur le certificat.' text as sub label and 'Maximum 20 caractèresform' text as :after content.

    #cid_9 .form-sub-label:after {
    display:flex;
    content: "Maximum 20 caractèresform";

    }

    Thank you.

  • Profile Image

    Answered by AA_C on January 19, 2017 at 03:24 PM

    Hi,

    This did exactly what I wanted. Thank you!

    Regards
    Robert
    AAC

  • Profile Image
    JotForm Support

    Answered by Mike_G on January 19, 2017 at 07:54 PM

    On behalf of my colleague, Mike, you're most welcome.

    Please feel free to contact us again anytime should you have other questions or concerns.

    Thank you.