Hi,
We are working on some big project which has a lot of forms,
some of them have file upload fileds which I would like to
style with CSS, but of course it is impossible without a trick.
Therefore I figured out that I will use a technique presented on
quircksmode.com
http://www.quirksmode.org/dom/inputfile.html but instead of using an image as a "browse" button I would like
to use regular <input type=button /> with our css class (
.btn - because it is done for other inputs already,
and it has :hover change)
So is it possible to
- <div style="position: relative;">
- <input type="file" name="myfile" id="realFileUploader" />
- <div id="fakeFile" style="position:absolute;top:0;left: 0;z-index: 0;">
- <input class="inpt" type="text" name="file_trick" id="fakeFileInput" style="width: 200px;" />
- <input type="button" class="btn" value="BROWSE" id="fakeFileBrowse" />
- </div>
- </div>
- $(document).ready(function(){
- $('#fakeFileBrowse, #fakeFileInput').click(function(e){
- $('#realFileUploader').trigger('click');
- });
- });
??
Of course I'm asking because it doesn't work this way

best regards
ps: I am posting my first time and 'New Post' button was hard to find for me