Styling File Selectors
Posted: 11 February 2011 08:56 AM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2011-02-11

By and large one can use CSS to change the appearance of most HTML form controls - by and large. The one major exception is the
<input type="file">

control used to allow the user to select files for upload to a server. The block on styling this control is deliberate - the idea is to guard against a user accidentally giving away valueable personal information by uploading a file because he/she did not realize that this was being done owing to an upload control that had been styled out of all recognition.

Personally, I feel this is something of an exaggeration.  The complete lack of styling over this control is quite galling - you can make a really pretty looking web page only to see it ruined by a file selector box that looks like it just stepped out of 1992.

Here is a way to get round the problem

http://www.explainth.at/en/html/fileupstyle.shtml

The technique requires Javascript to be enabled on the browser.  Enjoy!

Cheap Web Design

Profile