Skip to content

Instantly share code, notes, and snippets.

@wpmonks
Created July 18, 2017 12:54
Show Gist options
  • Save wpmonks/ba2df2e1baf154095eecf6d1e547b09b to your computer and use it in GitHub Desktop.
Save wpmonks/ba2df2e1baf154095eecf6d1e547b09b to your computer and use it in GitHub Desktop.
Here is the default Gravity Forms CSS for Field Labels
.gform_wrapper .gsection .gfield_label,
.gform_wrapper h2.gsection_title,
.gform_wrapper h3.gform_title {
font-weight: 700;
font-size: 1.25em
}
.gform_wrapper .gfield_error .gfield_label {
color: #790000
}
.gform_wrapper li.gfield.gfield_error.gfield_contains_required div.ginput_container,
.gform_wrapper li.gfield.gfield_error.gfield_contains_required label.gfield_label {
margin-top: 12px
}
.gform_wrapper li.gfield.gfield_error.gfield_contains_required fieldset legend.gfield_label {
position: relative;
top: 12px
}
.gform_wrapper li.gfield fieldset legend.gfield_label {
width: 100%;
line-height: 32px
}
body .gform_wrapper ul.gfields li.gfield label.gfield_label {
margin-bottom: 0!important;
padding-bottom: 0!important
}
.gform_wrapper label.gfield_label {
font-weight: 700;
font-size: inherit
}
.gform_wrapper .right_label .gfield_label {
text-align: right
}
.gform_wrapper .top_label .gfield_label {
display: -moz-inline-stack;
display: inline-block;
line-height: 1.3;
clear: both
}
.gform_wrapper .hidden_label .gfield_label,
.gform_wrapper label.hidden_sub_label,
.gform_wrapper label.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute!important;
height: 1px;
width: 1px;
overflow: hidden
}
.gform_wrapper .top_label .field_sublabel_above label.gfield_label+.ginput_complex.ginput_container,
.gform_wrapper .top_label .field_sublabel_above label.gfield_label+div[class*=gfield_time_].ginput_container {
margin-top: 0
}
@wpmonks
Copy link
Author

wpmonks commented Jul 18, 2017

Detailed guide for Gravity Forms Field Labels
https://wpmonks.com/blog/detailed-guide-gravity-forms-field-labels/

Direct download link for free gravity forms designer tool
https://wordpress.org/plugins/styles-and-layouts-for-gravity-forms/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment