Bootstrap Switch : Single Line Label

  • justinwinkelmann
    Asked on February 13, 2025 at 1:27 PM

    Are you able to adjust the sizing so that the label appears as a single line? When I adjust the width, I am able to preview it and show a single line but the alignment changes.

    • Single line label
    • Right alignment (preferably aligned to the right as possible)

    Bootstrap Switch : Single Line Label Image 1 Screenshot 30

    Bootstrap Switch : Single Line Label Image 2 Screenshot 41

  • Kyle JotForm Support
    Replied on February 13, 2025 at 3:11 PM

    Hi Justin,

    Thanks for reaching out to Jotform Support. I understand the issue. Let me look into it and get back to you with a solution.

    Reach out again if you need any other help.


  • Kyle JotForm Support
    Replied on February 14, 2025 at 11:24 AM

    Hi Justin,

    Let's inject a custom CSS code into your form and on the widget to achieve this. Let me show you how:

    Inject Custom CSS in Form Designer:

    1. Copy the CSS code below:
    #id_3 iframe,
    #cid_3 iframe {
      margin-left: 60% !important;
    }

    2 . Choose the Paint Roller icon located in the top-right corner of the Form Builder.

    3 . Navigate to Styles at the top of the Form Designer window on the right.

    4 . Under Inject Custom CSS, enter your code; all modifications are automatically saved. Bootstrap Switch : Single Line Label Image 1 Screenshot 30

    Inject Custom CSS in the widget:

    1. Copy the CSS code below:
    #switch {
    float:right;
    white-space: nowrap;
    }

    2 . In Form Builder, click the Bootstrap Switch Field widget.

    3 . Click the Wand icon to open the Widget Settings, select the Custom CSS tab and paste the code.

    Bootstrap Switch : Single Line Label Image 2 Screenshot 41 Give it a try and reach out again if you have any other questions.

Your Answer