CSS Customize the Size of Button Text

  • Last update:  2020-12-16
  • I. Overview

    1.1 Requirement

    Except for the custom buttons in the parameter pane, the size of texts in a cell or a button cannot be changed even if you reset the width and height of the cell or change the font size of the texts in the cell.

    How to customize the text size in a button? Here are some steps you may follow:


    1.2 Solution

    Use CSS to set button height and font size.

    II. Steps

    2.1 Create a new template

    Create a new template and add two Button widgets into the parameter pane. Set the widget names to Submit and Reset respectively:

     

     

    2.2 Write CSS codes

    Create a TXT file, name it“button.css” and click Save. Input the following CSS:

    #fr-btn-BUTTON0 .fr-btn-small button.fr-btn-text,
    #fr-btn-BUTTON1  .fr-btn-small button.fr-btn-text{
       height: 40px;
       font-size: 25px;
    }

    Note

    Height: Refers to the button height;

    font-size: Set the font size as you want;

    fr-btn-BUTTON0 and fr-btn-BUTTON1: BUTTON0 and BUTTON1 are button names:

     

     


    2.3 Reference CSS File

    Save the edited CSS file “button.css” to a location under \webapps\webroot\help\css.

    Open the template and click [Template]>[Web Attributes] >[Reference CSS].

     

     

    2.4 Preview

    Click [Page Break Preview] and the preview effects are shown as follows:

    After modification:

    Before modification:

    III. Download the template

    3.1 Template

    Use CSS to set button height and font size..cpt


    3.2 Reference the CSS file

    button.css


    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy