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.

General css style for multi-column checkbox

  1. I have 2 fields in my form that use checkbox.
    I use multi-column checkbox for one field of my form. i append the follow code to the my css stye sheet
    ul#input_1_5 {overflow:visible;}
    ul#input_1_5 li {float:left; width:12%;}

    My problem is I use individual form for individual post. Is there a general code to use where i do not need to keep adding new id code to create the multi-column checkbox for each new form.

    See http://www.propertyhomes.sg/robinson-suites-near-marina-bay/

    Thanks.

    Posted 14 years ago on Friday November 12, 2010 | Permalink
  2. Okay, try this out. This should work the way you want for the salutation options and apply globally as well.

    add this to your style sheet.

    .gform_wrapper li.gf_list_inline ul.gfield_checkbox li,
    .gform_wrapper li.gf_list_inline ul.gfield_radio li {width:auto!important; float:none!important; display: -moz-inline-stack; display: inline-block; zoom: 1; *display: inline; margin:0 10px 10px 0;}

    then, when creating your form in the form editor, click on the salutation field (or any multiple choice/checkbox list you want to apply this too), click on the advanced tab and place this in the "CSS class name" field.

    gf_list_inline

    Save the form and then it should display all of the items in that list in an inline format. Just to be clear, the inline format isn't equally spaced columns, it just allows the elements to all float inline like text. This works particularly well with just a couple of items, or items with labels of significantly different lengths.

    This is actually something we're adding as a default style in the new 1.5 version that will be out soon. You can read up about this "ready class" and others here.

    http://www.gravityhelp.com/css-ready-classes-for-gravity-forms/

    Posted 14 years ago on Friday November 12, 2010 | Permalink
  3. Got it. Thanks

    Posted 14 years ago on Friday November 12, 2010 | Permalink