Print This Post

Opera/Mac opacity on file inputs

I think this might be the shortest post I’ve ever written. More a note to myself and anyone else working with Opera 9.5 on the Mac.

One of the features of the ASP.Net file upload module is that it allows styling of file inputs using a method found on www.quirksmode.org. This works great on any browser that supports opacity- including IE 6/7, Firefox Windows/Mac, and Opera (supposedly). However it always refused to work correctly on Opera 9.5 on OSX Leopard. I’ve just spent hours trying to fix this. No matter what I tried when I set the opacity of an input type="file" element to 0 it refused to take effect. Until I also added border: none to the CSS class, then it worked fine. Sigh.

There Is 1 Response So Far. »

  1. Just ran into nearly the same problem, thanks for your solution!

    In my situation I was trying to use jQuery to make a form fade out, which didn’t work. Apparently if an element contains a submit button, the opacity won’t change. Thankfully the border:none trick worked here as well.

Post a Response