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.

IE9 Styles File Input Terribly

  1. When using a file input on IE9 it extends the input field all the way across the screen. Considering there are a bunch of !important decelerations on the width, I was wondering how I should go about fixing this.

    You can see this at http://jgvisualdev.com/mar/education/instructors/submit-instructor/.

    Thank you.

    Posted 12 years ago on Saturday June 4, 2011 | Permalink
  2. There is very little you can do with the file input type when it comes to styling with CSS. The button is pretty much inaccessible to styling in most browsers while some will let you control other properties such as background & font colors, etc. Usually, you can't change the width of the file input with CSS. I don't have IE9 installed on the machine I'm using right now so can't fully test that to verify if it is or isn't accessible with CSS in the newest version of IE.

    You can easily override the important declarations by using better CSS specificity. You can try this.

    [css]
    html body .gform_wrapper form .gform_body ul.gform_fields li.gfield .ginput_complex .ginput_full input[type=file] {
    width:300px!important;
    background-color:red
    }

    and see if that does anything to change the width.

    Posted 12 years ago on Saturday June 4, 2011 | Permalink
  3. Thanks a lot Kevin. I had tried using some more specific css, but I guess I didn't make it specific enough. In any case, that did the trick.

    Posted 12 years ago on Saturday June 4, 2011 | Permalink
  4. Okay, wonderful. Thanks for the update. I had hoped that would work, but since I couldn't test with IE9 at the moment was unsure. Very glad it worked for you.

    Posted 12 years ago on Saturday June 4, 2011 | Permalink

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