Padding between labels

I need some help in adding paddings between label elements. I try adding paddings and margins but it doesn’t seems to take effect.

  1. Write what is happening.
  2. Show your code.
  3. Write what you tried.
1 Like

show the code atleast where you tried to write by attaching a link.

Here is my Survey form, I was trying to get some padding between the labels for the radios and checkboxes

Quoting from W3schools:

Padding is used to create space around an element’s content, inside of any defined borders

Any defined borders are the keywords here. Your padding can only get as big as parent element.

You can try margins instead. Also increasing parent size is an option, or using flexbox/grid.


Or wrapping every label in a <div> element.

Labels are inline elements so I guess that may be the reason for that.

Yeah that’s it, you can set the labels and inputs to inline-block so the margins have an effect.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.