Problem setting the font of a radio type field

Support MB Blocks Problem setting the font of a radio type fieldResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23524
    DANIEL FITIPALDO R.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.

    #23525
    Long NguyenLong 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.DANIEL FITIPALDO R.
    Participant

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

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