Transparency - not just for corporations
Wednesday July 1, 2009
One of the nice things about time is that eventually most CSS features become supported by the major browsers. When I first wrote about opacity several years ago, it wasn't widely supported. Having the browser fade an image or make it transparent was a pipe dream and the best you could hope for was a photoshopped image layered on top of text with z-index positioning. But now it's more widely supported and there are some great effects you can do with it. But first you need to learn how to do opacity with CSS. And that tutorial from Coding Cow is helpful and pretty.


Thanks for featuring CodingCow on this article, appreciated!
I usually use JS for the opacity, or conditional comments (I need a MSIE voodoo doll!), so my page would validate.
Alexander: but if JS is turned off, your opacity disappears just as if they were using IE.
And how many people actually turn off JavaScript? There’s more chance of people not having an up to date browser.
The percentage of people who turn off JavaScript often depends upon your audience. One site I worked on had an audience that was very security conscious and many of the people felt that JS was a security risk. So they turned it off. Another site I worked on focused on Ajax and so everyone had JS on all the time.
My point was less about the specifics of JS but more that you should be aware of your customers and that a “solution” that you find may not be a solution for everyone. As you point out, older browsers might not support it either.