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.

Mixed Label Placement

  1. 3dp
    Member

    Is it possible to mix label placements? For most of my form, I'd prefer top placement. But I have a section or two where left or right placement is preferred.

    http://www.gravityhelp.com/forums/topic/label-to-left-of-only-certain-fields isn't seeming to do the trick, especially when I want the field to be to the left with the label on the right.

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  2. This can be done with CSS, because each field has it's own unique ID. So you'd just stick with the top label placement, then we'd need to use custom CSS for the others. Do you have a link to your form?

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  3. 3dp
    Member

    Rob,

    Thanks... Unfortunately, I don't have a URL that I can share. The form is behind a wall.

    Here's what I have in my CSS:

    #input_11_176 .gfield_label,
    #input_11_178 .gfield_label,
    #input_11_180 .gfield_label,
    #input_11_182 .gfield_label,
    #input_11_184 .gfield_label {
    	float: left;
    	margin: 0;
    	}
    
    #input_11_176, #input_11_178, #input_11_180, #input_11_182, #input_11_184 {
    	width: 5%;
    	 }

    What's happening is that the label is to the left and the input box is below the label to the left. I'd like the input box to the left with the label to the right on the same line.

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  4. Can you export the form and send the XML file to me and reference this post so I can take a look.

    rob@rocketgenius.com

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  5. So here is a screenshot of one field example. In my dev site this was how I had to target those two:

    Label

    Input

    Your form ID might be different, as well as your field IDs. So you'll need to inspect your code using Chrome Dev Tools or Firebug for Firefox to find the IDs. So you can follow my example in the two screenshots above.

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  6. 3dp
    Member

    Thanks... it's pretty close now.
    This is what I've got and it's works!

    li#field_11_176 .gfield_label,
    li#field_11_178 .gfield_label,
    li#field_11_180 .gfield_label,
    li#field_11_182 .gfield_label,
    li#field_11_184 .gfield_label {
    	margin: 5px 0px 0 5px;
    	text-align: left !important;
    	float: right;
    	width: 590px;
    	}
    
    #input_11_176, #input_11_178, #input_11_180, #input_11_182, #input_11_184 {
    	float: left;
    	width: 30px;
    	 }
    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  7. Right on Paul, glad to help out!

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink

This topic has been resolved and has been closed to new replies.