CSS Transparency for Firefox, IE and Opera
A simple way to add some transparency to HTML elements.
Author:
Jonas John
License:
Public Domain
Language:
HTML
Created:
09/19/2006
Updated:
09/19/2006
Tags:
tutorials, html, examples, css
<!------> <!-- a little bit css here: --> <style type="text/css" media="all"> td { vertical-align: top; } #table { margin: 0 auto; width: 300px; } .red_box { width: 100px; height: 100px; background-color: #7A1417; } </style> <!-- a table with some images and divs --> <table border="0" cellpadding="5" cellspacing="2" id="table"> <tr> <td valign="top"> 90 % opacity<br/> <img src="http://www.jonasjohn.de/lab/context_free/t008.png" style="filter: Alpha(opacity=90); opacity: .9;" /> </td> <td> 50 % opacity<br/> <img src="http://www.jonasjohn.de/lab/context_free/t008.png" style="filter: Alpha(opacity=50); opacity: .5;" /> </td> <td> 20 % opacity<br/> <img src="http://www.jonasjohn.de/lab/context_free/t008.png" style="filter: Alpha(opacity=20); opacity: .2;" /> </td> </tr> <tr> <td> 90 % opacity<br/> <div class="red_box" style="filter: Alpha(opacity=90); opacity: .9;" /></div> </td> <td> 50 % opacity<br/> <div class="red_box" style="filter: Alpha(opacity=50); opacity: .5;" /></div> </td> <td> 20 % opacity<br/> <div class="red_box" style="filter: Alpha(opacity=20); opacity: .2;" /></div> </td> </tr> </table>