CSS Transparency for Firefox, IE and Opera
A simple way to add some transparency to HTML elements.
<!------> <!-- 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>
Sorry folks, comments have been deactivated for now due to the large amount of spam.
Please try to post your questions or problems on a related programming board, a suitable mailing list, a programming chat-room,
or use a QA website like stackoverflow because I'm usually too busy to answer any mails related
to my code snippets. Therefore please just mail me if you found a serious bug... Thank you!
Older comments:
None.