Styling a Form Field Label


#1

Hello,

I’m trying to style my form field labels so they have some bottom margin to increase the spacing between the label and the field, but I can’t seem to get it to work.

Has anyone every successfully adjusted the spacing of their form field labels?

http://unbouncepages.com/coast-flight-rtp/



#2

Hi @shoodwin!

You could try grabbing the ID of the field instead of the label and add some top margin. This worked when I tried it. It should look something like the following:

select#ELEMENTID.ub-input-item.single.form_elem.ELEMENTID

If you go back into Chrome dev like you did on the screenshot, you’ll be able to find and test it there.

I hope that solves it. Let me know if you need further assistance!


#3

Hey @Caroline

That was a great tip, thank you.

Here’s what worked for me:

#lp-pom-form-117 .lp-pom-form-field .single {
margin-top:6px;
}

#lp-pom-form-117 .option {
margin-top: 6px;

I had to use the form element ID instead of the field ID, but 1,000 thank you’s :clap:t3:

Shane