Previous Message
Next Message

Styling an input type="file" - possible

Sent by Lachlan Hunt on 5 September 2004 13:01


Peter-Paul Koch wrote:
> To my surprise a reader of my site recently sent me a very clever way of 
> styling an input type="file". It works in Explorer 5.5+ Windows, Mozilla 
> and Safari.
> 
> http://www.quirksmode.org/dom/inputfile.html

It doesn't degrade very well for users with CSS, but without javascript, 
but that could probably be fixed by using JS to apply the styles when it 
is supported.  However, there are serious security concerns with being 
able to apply styles to file upload controls, and hence why browser 
vendors have gone to great lengths to try and prevent file upload 
controls from being easily styled.

See this bug [1] for some of the reasons.  It's just one that I could 
find quickly, but the general idea is that it makes it far too easy to 
trick the user into entering a file path, which is made even easier 
since it is now possible to make a file upload control look like a text box.

[1] http://bugzilla.mozilla.org/show_bug.cgi?id=57770

-- 
Lachlan Hunt
http://www.lachy.id.au/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: