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.

Add CSS Class not doing what I expect

  1. OK so I am adding a form in a responsive theme using Bootstrap. Up to now I have put a <div class="span3"> in my page and wrapped the shortcode for my previous form plugin in that div. So I see that I can add a css class in the settings in GF.

    When I do that it comes out as span3_wrapper which obviously, isn't any good. So if I put span3 and a space it comes out in the code as span3 _wrapper which worked I think, but leaves a stray _wrapper in the code.

    What should I do about that?

    Thanks

    Martin

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  2. Richard Vav
    Administrator

    When you add a class to the form settings advanced panel you are actually adding that class to both the form wrapper and the form tag as shown below, so any styles you assign the class span3 will be applied to to only the form tag, if you remove the _wrapper they will be applied to both the div and the form tag.

    <div class="gf_browser_chrome gform_wrapper span3_wrapper" id="gform_wrapper_1">
    <form method="post" enctype="multipart/form-data" id="gform_1" class="span3" action="">

    If you do only want to apply the class span3 to the wrapper div and not the form tag as well you could forget adding the class in form settings and use the jquery addclass method http://api.jquery.com/addClass/

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  3. Oh, thanks richardvav

    I didn't notice that.

    Sorted

    Martin

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink

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