Roshanck
Roshanck

Reputation: 2290

HTML file selector(input type="file") button doesn't display correctly in chrome browser

I have a html file selector in index.php file.Code is given bellow

//index.php (This is just an example)
<form enctype="multipart/form-data" action="http://myserver/abc/upload.php" method="POST">
      Select image to upload :     
      <input name="photo" type="file" size="30" width="250">          
      <input type="submit" value="Upload"/>
</form>

In firefox browser I can see file selector with a text field(which display the file path) and a button named 'Browse'(As a normal file selecting field)
But in chrome browser I can't see the text field.And button name is 'Chose file' not 'Browse'.
How can I fix this?
I need to display this in all browsers as it is display in firefox browser

Upvotes: 0

Views: 3508

Answers (2)

SREERAG M
SREERAG M

Reputation: 21

Change your file type by adding this inline style

<input name="photo" type="file" size="30" width="250" style="line-height:0;">

Upvotes: 0

heximal
heximal

Reputation: 10517

there is no standard way of customizing file input style, but you can find a tons of css/js tricks. use keywords: custom css file input

Upvotes: 1

Related Questions