Advertisement
chrishajer

CSS for Gravity Forms Post 70962

Aug 27th, 2012
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.20 KB | None | 0 0
  1. /* http://www.gravityhelp.com/forums/topic/changing-the-background-colour-of-a-form#post-71011 */
  2. /* change ALL instances of 140 here to your actual form ID and check field numbers as well */
  3. /* Chris Hajer 21 August 2012 */
  4. /* hide label and also "required" asterisk for MPAN fields */
  5. body div#gform_wrapper_140 label[for="input_140_28"],
  6. body div#gform_wrapper_140 label[for="input_140_29"],
  7. body div#gform_wrapper_140 label[for="input_140_30"],
  8. body div#gform_wrapper_140 label[for="input_140_31"],
  9. body div#gform_wrapper_140 label[for="input_140_32"],
  10. body div#gform_wrapper_140 label[for="input_140_33"],
  11. body div#gform_wrapper_140 label[for="input_140_34"] {
  12.         display:none;
  13. }
  14. /* add consistent height and a black border to the 7 MPAN fields */
  15. body div#gform_wrapper_140 input#input_140_28,
  16. body div#gform_wrapper_140 input#input_140_29,
  17. body div#gform_wrapper_140 input#input_140_30,
  18. body div#gform_wrapper_140 input#input_140_31,
  19. body div#gform_wrapper_140 input#input_140_32,
  20. body div#gform_wrapper_140 input#input_140_33,
  21. body div#gform_wrapper_140 input#input_140_34 {
  22.         padding: 0px;
  23.         margin: 0px;
  24.         height: 25px;
  25.         border: 1px solid #000000;
  26.         background-color: #FFFF99;
  27.         color: #000000;
  28. }
  29. /* remove 14px right margin from the gf_inline CSS Ready Class */
  30. body div#gform_wrapper_140 li#field_140_28,
  31. body div#gform_wrapper_140 li#field_140_29,
  32. body div#gform_wrapper_140 li#field_140_30,
  33. body div#gform_wrapper_140 li#field_140_31,
  34. body div#gform_wrapper_140 li#field_140_32,
  35. body div#gform_wrapper_140 li#field_140_33,
  36. body div#gform_wrapper_140 li#field_140_34 {
  37.         margin-right: 0px;
  38. }
  39. /* set the width and borders for all 7 inputs */
  40. body div#gform_wrapper_140 input#input_140_28 {
  41.         width: 41px!important;
  42.         border-right: none;
  43.         border-bottom: none;
  44.         border-left: none;
  45. }
  46. body div#gform_wrapper_140 input#input_140_29 {
  47.         width: 48px!important;
  48.         border-right: none;
  49.         border-bottom: none;
  50. }
  51. body div#gform_wrapper_140 input#input_140_30 {
  52.         width: 48px!important;
  53.         border-bottom: none;
  54. }
  55. body div#gform_wrapper_140 input#input_140_31 {
  56.         width: 24px!important;
  57.         border-right: none;
  58.         border-left: none;
  59. }
  60. body div#gform_wrapper_140 input#input_140_32 {
  61.         width: 39px!important;
  62.         border-right: none;
  63. }
  64. body div#gform_wrapper_140 input#input_140_33 {
  65.         width: 39px!important;
  66.         border-right: none;
  67. }
  68. body div#gform_wrapper_140 input#input_140_34 {
  69.         width: 34px!important;
  70. }
  71. /* remove top margin on HTML fields */
  72. body div#gform_wrapper_140 li#field_140_36,
  73. body div#gform_wrapper_140 li#field_140_37,
  74. body div#gform_wrapper_140 li#field_140_38 {
  75.         margin-top: 0px;
  76. }
  77. /* make sure the images don't inherit any padding or margin */
  78. body div#gform_wrapper_140 li#field_140_37 span,
  79. body div#gform_wrapper_140 li#field_140_38 span {
  80.         margin: 0;
  81.         padding: 0;
  82. }
  83. /* break 7 MPAN fields into two lines after the 3rd item in the top line */
  84. span.clear, .clear {
  85.         display: block;
  86.         clear: both;
  87.         width: 1px;
  88.         height: .001%;
  89.         font-size: 0px;
  90.         line-height: 0px;
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement