views:

14

answers:

2

Hi Guys,

I would like to know whether this is possible with input:file

URL: http://www.kryogenix.org/code/browser/labelify/

Regards,
naveenj

+1  A: 

I don't think so. There is no simple way that you can style input:file. You need to use a different file upload mechanism - either a flash based one, or one using the new HTML5 features.

tathagata
+1  A: 

You can have a input button/text pointing to a hidden file input. A rough example would be like:

<input type="button" value="Filessssss" onclick="this.nextElementSibling.click();">
<input type="file" style="visibility:hidden;display:absolute;" onchange="this.previousElementSibling.value=this.files[0].name">

Then you can apply labelify on the button or text. (tested on Chrome)

digitalFresh
great solution...not working in IE6 though... UPDATE: then again... who really cares if its working in IE6?
naveen