Custom Fields
Re-Envisioned
Support MB Blocks Problem setting the font of a radio type field

  • Creator
    Topic
  • #23524
    Resolved DANIEL FITIPALDO R.
    Participant

    Hi,
    I've created a block with a radio field ( 'type' => 'radio') and a custom CSS class 'radiostyle'. I like to change the default font but I do not know how to do that. I've tried with:
    .radiostyle .rwmb-input .rwmb-radio {change font here} or
    .radiostyle .rwmb-input .rwmb-text {change font here}
    but did not work.
    Can you help me how should I do it?
    This is how the field is created:

     [
                    'id'      => $prefix . 'radio_e0432gtno2d',
                    'name'    => esc_html__( 'Radio Test', 'text-domain' ),
                    'type'    => 'radio',
                    'std'     => 'no',
                    'options' => [
                        'yes' => esc_html__( 'Test 1', 'text-domain' ),
                        'no'  => esc_html__( 'Test 2', 'text-domain' ),
                    ],
                    'class'   => 'radiostyle',
                    'columns' => 12,
                ],

    thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #23525
    Long Nguyen
    Moderator

    Hi,

    Here is the CSS code to change the label text of radio options.

    .radiostyle .rwmb-input label {
        font-family: serif;
        font-size: 20px;
    }

    You can use the Inspect Tool to check the HTML elements. Screenshot https://share.getcloudapp.com/YEuQZjwk.

    #23527
    DANIEL FITIPALDO R.
    Participant

    Thank you Long for the tip!. It worked as expected!. You can close the ticket as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.