PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Moving Field Alignment

  1. jkjacobson
    Member

    Is it possible using custom CSS to place 2 fields side by side rather than in a vertical hierarchy?

    If you visit http://www.campeau.j2webworks.com/contact you see the default means of display. What I would like is for the Phone field to be to the right of the Email field (directly under the Last Name).

    Also I want to add additional spacing (padding) between the Drop down field and the larger comment box. If I had to add top padding to all the fields using CSS that would suffice.

    Posted 12 years ago on Saturday January 21, 2012 | Permalink
  2. Richard Vav
    Administrator

    Ok so looking at the email and phone fields first you need to edit the email field and on the advanced tab add gf_left_half to the css class name box. Next edit the phone field and add gf_right_half to the css class name box, adding those class names should once you save and preview your form place those two fields side by side. For future reference this page of the documentation tells you all about all the ready-made classes you can use. http://www.gravityhelp.com/documentation/page/CSS_Ready_Classes

    Now for your second issue if add something like the following to your stylesheet changing the 25px to whatever figure you want should increase the gap between the dropdown and the comment box.

    #field_1_4{margin-top:25px}

    Check out the following page of the documentation for more examples of how to target and style specific gravity forms elements http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Posted 12 years ago on Saturday January 21, 2012 | Permalink
  3. jkjacobson
    Member

    That worked after some trial and error... interesting thing quirk you may or may not be aware of is that if you copy and paste "gf_right_half" into the CSS Name box it looks fine, click UPDATE FORM and .... it doesn't take. After trying several times I realized through trial and error that it has to be MANUALLY TYPED IN in order for it to stay saved in the CSS Name box once you click UPDATE FORM...

    Thanks though! It's exactly what I wanted.

    Posted 12 years ago on Saturday January 21, 2012 | Permalink
  4. Richard Vav
    Administrator

    Sorry, forgot to mention that, I have found that if you paste anything into any of the boxes on the field editor that it rarely keeps it unless you manually edit it a bit before saving.

    Posted 12 years ago on Saturday January 21, 2012 | Permalink