{"id":10817,"date":"2024-09-19T16:47:27","date_gmt":"2024-09-19T16:47:27","guid":{"rendered":"https:\/\/purelysupp.com\/wordpress\/?p=10817"},"modified":"2024-09-19T16:57:12","modified_gmt":"2024-09-19T16:57:12","slug":"wpmudev-forminator-radio-button-alignment","status":"publish","type":"post","link":"https:\/\/purelysupp.com\/wordpress\/code-snippets\/wpmudev-forminator-radio-button-alignment\/","title":{"rendered":"WPMUDEV Forminator Radio Button Alignment"},"content":{"rendered":"\n<p>To align radio buttons horizontally in WPMU DEV&#8217;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.<\/p>\n\n\n\n<p>Here&#8217;s a general approach:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Target the form&#8217;s radio button wrapper using CSS.<\/li>\n\n\n\n<li>Apply <code>display: inline-block<\/code> or <code>display: inline-flex<\/code> to align them horizontally.<\/li>\n<\/ol>\n\n\n\n<p>Here\u2019s an example of CSS you could add to your theme&#8217;s stylesheet or through the custom CSS section in WordPress:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Container for radio buttons *\/\n.forminator-radio {\n    display: inline-flex; \/* Aligns items in a row *\/\n    align-items: center;  \/* Vertically centers items *\/\n    margin-right: 15px;   \/* Spacing between radio buttons *\/\n}\n\n\/* Ensures the label and radio button are properly aligned *\/\n.forminator-radio input&#91;type=\"radio\"] {\n    margin: 0; \/* Removes default margin *\/\n    vertical-align: middle; \/* Ensures radio button aligns with text *\/\n}\n\n.forminator-radio label {\n    margin-left: 5px; \/* Space between radio button and label text *\/\n    vertical-align: middle; \/* Ensures label text aligns with the radio button *\/\n}<\/code><\/pre>\n\n\n\n<p>This CSS should align your radio buttons horizontally across the entire form without needing to add extra classes or grids. You can adjust the <code>margin-right<\/code> and <code>margin-left<\/code> values as needed to control spacing between the radio buttons and their labels.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To align radio buttons horizontally in WPMU DEV&#8217;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&#8217;s a general approach: Here\u2019s an example of CSS you could add to your theme&#8217;s stylesheet or through\u2026&nbsp;<a href=\"https:\/\/purelysupp.com\/wordpress\/code-snippets\/wpmudev-forminator-radio-button-alignment\/\" class=\"rmlink\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":3547,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","iawp_total_views":21,"wds_primary_category":0,"footnotes":""},"categories":[56,58],"tags":[262,133,260,261,63],"class_list":{"0":"post-10817","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-code-snippets","8":"category-plugins","9":"tag-alignment","10":"tag-css","11":"tag-forminator","12":"tag-radio-buttons","13":"tag-wpmudev","14":"entry"},"featured_image_src":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2018\/09\/code-snippits-600x400.jpg","featured_image_src_square":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2018\/09\/code-snippits-600x515.jpg","author_info":{"display_name":"Jack Alltrade","author_link":"https:\/\/purelysupp.com\/wordpress\/author\/jacka11trade\/"},"_links":{"self":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/10817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/comments?post=10817"}],"version-history":[{"count":2,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/10817\/revisions"}],"predecessor-version":[{"id":10819,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/10817\/revisions\/10819"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media\/3547"}],"wp:attachment":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}