Replace input type=file by an image

Posted by nikospkrk on Stack Overflow See other posts from Stack Overflow or by nikospkrk
Published on 2010-05-18T08:25:55Z Indexed on 2010/05/18 8:30 UTC
Read the original article Hit count: 261

Filed under:
|
|
|
|

Hi,
Like a lot of people, I'd like to customize the ugly input type=file, and I know that it can't be done without some hacks and/or javascript. But, the thing is that in my case the upload file buttons are just for uploading images (jpeg|jpg|png|gif), so I was wondering if I could use a "clickable" image which would act exactly as an input type file (show the dialog box, and same $_FILE on submitted page).
I found some workaround here, and this interesting one too (but does not work on Chrome =/).

What do you guys do when you want to add some style to your file buttons? If you have any point of view about it, just hit the answer button ;)

Cheers,
Nicolas

© Stack Overflow or respective owner

Related posts about input

Related posts about file