Alignment issues with Woocommerce Checkout

787 views Asked by At

Sorry for the really newbie question.

How do I align my labels with my radio button?

I have just added custom fields to my checkout page.

/**
 * Add the field to the checkout
 */
add_action( 'woocommerce_after_order_notes', 'my_custom_checkout_field' );

function my_custom_checkout_field( $checkout ) {


echo '<div id="my_custom_checkout_field"><h2>' . __('Delivery Timing') . '</h2>';

woocommerce_form_field( 'my_field_name', array(
    'type'          => 'radio','options' => array( 'a' => __( 'Morning 09:00 - 13:00' ), 'b' => __( 'Afternoon 14:00 - 18:00' ), 'c' => __( 'Evening 18:00 - 22:00' ) ),
    'class'         => array('my-field-class form-row-wide'),
    'label'         => __('Select Your Preferred Delivery Timing'),
    'required'      => true,
    ), $checkout->get_value( 'my_field_name' ));

echo '</div>';

}

Screenshot: enter image description here

0

There are 0 answers