Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Styling File Inputs with CSS and the DOM. Clever hack to style the un-stylable: set the opacity of the file input to 0, then use a bit of JavaScript to make sure the (now invisible) browse button is always under the mouse.

Tagged , , ,

2 comments

  1. Let's see, no mouse pointer feedback, no pliancy (arm/disarm on hover), no focus visibility. Just a bunch of dead pixels that expect you to interact with them because they tell you to.

    That designers suck as badly as programmers when it comes to usability is nothing new, but it's always good to get a reminder ;-)

    Fredrik - 11th September 2007 09:54 - #

  2. You missed the worst bit: it doesn't tell you if a file has actually been selected. Definitely worth linking to as an example of ingenious hackery though.

    Simon Willison - 11th September 2007 12:19 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site