To align radio buttons horizontally in WPMU DEV’s Forminator plugin (or similar plugins) without adding a new class or using a grid, you can use CSS to target the radio button elements directly and style them accordingly.
Here’s a general approach:
- Target the form’s radio button wrapper using CSS.
- Apply
display: inline-block
ordisplay: inline-flex
to align them horizontally.
Here’s an example of CSS you could add to your theme’s stylesheet or through the custom CSS section in WordPress:
/* Container for radio buttons */
.forminator-radio {
display: inline-flex; /* Aligns items in a row */
align-items: center; /* Vertically centers items */
margin-right: 15px; /* Spacing between radio buttons */
}
/* Ensures the label and radio button are properly aligned */
.forminator-radio input[type="radio"] {
margin: 0; /* Removes default margin */
vertical-align: middle; /* Ensures radio button aligns with text */
}
.forminator-radio label {
margin-left: 5px; /* Space between radio button and label text */
vertical-align: middle; /* Ensures label text aligns with the radio button */
}
This CSS should align your radio buttons horizontally across the entire form without needing to add extra classes or grids. You can adjust the margin-right
and margin-left
values as needed to control spacing between the radio buttons and their labels.
Share Your Two Cents