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.

Setting width of file upload field

  1. Tell It Media

    Is it possible to use CSS to set the width of the file upload field? I've set a CSS class for it in Gravity Forms, but it appears that GF automatically hard codes size=20 for this input type.

    Posted 12 years ago on Thursday August 11, 2011 | Permalink
  2. Not really. The input type "file" is difficult at best to apply any styles to and styling is not supported in all of the browsers for that control. That's a browser limitation due to how the control works and not something that Gravity Forms limits or can control.

    Posted 12 years ago on Friday August 12, 2011 | Permalink
  3. Tell It Media

    Thank you. Hadn't worked with this input type before. Run into something new every day.

    Posted 12 years ago on Sunday August 14, 2011 | Permalink
  4. And it's really a mess when you start comparing different browsers. Some have the button on the left, some the button on the right, some show an empty text box where the path to the file will appear, some show nothing.

    Posted 12 years ago on Sunday August 14, 2011 | Permalink
  5. Yep. It's frustrating that you're limited to the browser defaults on these types of fields. Select (drop-down) fields have a lot of styling limitations as well. Apparently the browser has to render these type of fields differently than standard inputs so the styling has to be locked down a bit.

    Posted 12 years ago on Sunday August 14, 2011 | Permalink

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