How can I align a radio button vertically with the label text in Webflow?

Published on
September 22, 2023

To align a radio button vertically with the label text in Webflow, you can use custom code or apply a few CSS styles. Here's how you can do it:

  1. Add a Radio Button element to your Webflow project by dragging and dropping it onto the canvas.
  2. Inside the Radio Button element, add a Text element (or any other element you want to use as the label).
  3. Select the Radio Button element and go to the Styles panel on the right-hand side.
  4. Under the "Display" section, change the display setting from "Inline" to "Block". This will make the radio button and label appear on separate lines, allowing for vertical alignment.
  5. Customize the label text by adjusting its font size, color, and other properties as desired.

If you prefer to use custom code, you can apply the following CSS styles to the Radio Button element:

input[type="radio"] {  display: block;  margin-right: 0;  margin-bottom: 10px;}

This code targets all radio buttons on your Webflow project and makes the necessary changes to align them vertically with the label text. You can add this code by embedding it in a <style> tag within an HTML embed element in Webflow.

Remember to publish your changes to see the aligned radio buttons in action on your live site!

Additional Resources:

Example Code

<label>  <input type="radio" name="option" value="1">  Option 1</label><label>  <input type="radio" name="option" value="2">  Option 2</label>
input[type="radio"] {  display: block;  margin-right: 0;  margin-bottom: 10px;}

Questions

  1. How do I vertically align a radio button with the label text in Webflow?
  2. Can I use custom code to adjust the alignment of radio buttons in Webflow?
  3. What CSS styles can I apply to make radio buttons appear vertically aligned with label text in Webflow?