How to style the file input

Archived from the Transloadit support forum. Originally posted on October 4, 2011; details may be outdated, see our docs for current behavior. Original thread

Hello,

I would like to style the file input, so it just looks like a big button, rather than the standard text field / grey button combo. I have seen uploadify.com, which does this using a jQuery plugin and a swf, so I was wondering if there any examples of this being done for the transloadit upload experience?

Thanks,

J.

I just had it pointed out to me that Gmail’s “attach a file” is done with a trasparent swf on top of it. So I suppose the question here is really, “how do you connect an uploader swf to transloadit?” and “can this take advantage of the transloadit jquery plugin?”.

Thanks,

J.

Hey Jonathan,

there aren’t any examples yet that we are aware of for including an swf.

However, if you just want to change the style of the button you can just overwrite its css. Let me know, if you need help with this.

Kind regards,
Tim

Hi Tim,

Thanks for the response.

The problem is that you can’t really style file input buttons consistently, or at all in some browsers. Are you aware of a way to do this? If not, I’ve read that replacing the input with a swf is the way to go.

J.

Hey J.,

yeah I am aware of that.

You may want to check out this: http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom

That’s a solution without an swf, by cleverly placing a different button above the file browser button.

Let me know how it goes!

Kind regards,
Tim