Theodore Serbinski [EMAIL-REMOVED]> wrote:
> Got a question, this code does not correctly style the <input
> type="file" />. Ideas?
You can't style an <input type="file" /> at all really. Browsers mostly
ignore styles, and those they do apply are applied differently in
only browser that allows you to open the Browse box programmatically,
but even then if you do, it refuses to send the file when you submit the
The only successful strategy I have met for styling file uploads is to
create a surrogate control, place the <input type="file" /> directly
over it using CSS positioning, and then make the input effectively
invisible using CSS opacity (the alpha filter in IE). And this still has
the problem that you have to line up the positioning of the browse
button in the surrogate, which will be different in every browser and
there's no way to find out what it is.
To summarise: styling file uploads is scarcely possible, difficult to do
compatibly and accessibly even then, and generally not worth the insane
To summarise the summary: aaarrrrgh.
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/