Spacing between checkbox and text?

2k Views Asked by At

I'm having trouble figuring out how to add custom CSS to add spacing between a checkbox and text ( Ship to a different address?). Anytime I add margin or padding the whole element (checkbox + text) is moved. See picture attached? Thanks for your help!

https://roynattivmd.com/checkout/

Checkbox and text:

1

2

There are 2 best solutions below

5
On

You could add some spacing by adding margin-right: [value]; to the specific input. Since you are using elementor, you might do this via inline-styles.

<label for="myInput">
  <input id="myInput" type="checkbox" style="margin-right: .5rem;">
  Ship to a different address?
</label>

Or via an external stylesheet:

#myInput {
  margin-right: .5rem;
}
<label for="myInput">
  <input id="myInput" type="checkbox">
  Ship to a different address?
</label>

0
On

Please try this code,To Spacing between checkbox and text?

    dd label input {
           margin-right:10px;
        }
    <dd id="rr-element">
           <label for="rr-1">
              <input type="checkbox" value="1" id="rr-1" name="rr[]">
              Value 1
           </label>
        </dd>

I hope this code will be useful.

Thank you.