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.

Problem with white-space: nowrap !important

  1. Hello
    When I resize the browser to a mobile size. Two fields do not wrap due to this css in the gform stylesheet.
    .gform_wrapper li.gf_inline div.ginput_container {
    white-space: nowrap !important
    }
    How can I change to white-space: normal;?

    Test Site URL
    http://www.grappler.tk/dyebata/contact

    Thanks

    Posted 11 years ago on Saturday May 19, 2012 | Permalink
  2. This should do the trick for you:

    [css]
    .gform_wrapper li.gf_inline div.ginput_container {
    white-space: normal !important;
    }

    If you need a more specific selector you could do something like this instead (ID only this form wrapper):

    [css]
    #gform_wrapper_1 li.gf_inline div.ginput_container {
    white-space: normal !important;
    }
    Posted 11 years ago on Saturday May 19, 2012 | Permalink
  3. I am sorry but it doesn't work. I need a general solution. The css in my child theme is unable to over come the css in the plugin stylesheet.

    You does GravityForms always use so much !important in their css?

    Thanks,

    P.s. How do you put that code in your reply?

    Posted 11 years ago on Saturday May 19, 2012 | Permalink
  4. You used a . (class) selector when you copied my first example. But you need to use the ID to overwrite the CSS to select it more specifically. See this Screenshot for an explanation.

    Our CSS is super-tight. Sometimes, using !important is required, depending on certain situations. I'm sure you can appreciate that when trying to create a global plugin stylesheet that works in a lot of different scenarios. You can always add a class to your form and/or individual fields in the formbuilder to build your selector more specifically that will not need the !important. Actually, when you correct the CSS snippet as I showed in the screenshot above, you should not need the !important.

    Also, since your theme is using responsive design, you might even be able to throw a generic selector into a media query subset of the CSS to edit this word-wrap. Anyways, point is, skies the limit on selecting.

    To place css in the reply, just place [css] in between the backtick characters.

    Posted 11 years ago on Sunday May 20, 2012 | Permalink