katie
katie

Reputation: 2951

input file type

In many html tutorials they show input file type and the result being a button choose file type which when you click it pops up dialog box to select files from your hard drive,but when i run the same code i get the text input box with the button on the side saying browse.I want to get the same result how do i do that?Here is the code

enter code here <input type="file" id="flupload" name="fileupload/>

Upvotes: 1

Views: 1181

Answers (3)

Tanner Ottinger
Tanner Ottinger

Reputation: 3060

This is easy to make with a little CSS ... Just make the real file input element completely opaque, then position that right on top of the dummy. It may take some JS to make hovers, though.

Here are some tutorials: http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom http://www.quirksmode.org/dom/inputfile.html

Hope those help!

Upvotes: 0

Paul
Paul

Reputation: 6871

The display of the file input type depends on your browser so to get the other display you would have to switch browsers.

Upvotes: 0

deceze
deceze

Reputation: 522025

Every browser has its own file input element style. A text box with a "Browse" button is the style your browser of choice is using. You cannot change that.

file inputs

Upvotes: 6

Related Questions