I want to create a webpage with a transparent background, a table and some text. I saw posts related to this, but due to my ignorance with css, I somehow cannot make my code work. I just want a transparent background, while this code makes everything transparent. Can someone kindly help.
<html> <head><style type="text/css"> div.transbg {background-color:#4a6c9b; opacity:0.6;} </style></head> <div class="transbg"> <body><Center><font color="#FFFFFF"> <b>Toll Charges</b> <table bgcolor="#000000" cellspacing=3> <tr> <td bgcolor="#009900"><font color="#FFFFFF" align="left"> Class 2 inc Private </font></td> <td bgcolor="#009900"><font color="#FFFFFF" align="right"> A$ 4.95 </font></td> </tr> <tr> <td bgcolor="#009900"><font color="#FFFFFF" align="left"> Class 2 inc Commercial </font></td> <td bgcolor="#009900"><font color="#FFFFFF" align="right"> A$ 13.95 </font></td> </tr> </table> <br> Toll has to be paid within 48 hrs of passage, else an additional A$ 13.95 of administration charges would be added </font></Center> </div> </body> </html>
Update
Thanks so much for all people's answers. I solved the problem differently at the moment. In fact, I am writing an iPhone application that uses Webview to display some html. I would like to give webview a transparent look that can be achieved by setting the alpha for the web view itself in the interface builder. Be that as it may, make my web browser 50% transparent. I would like to thank everyone for their help here.
html css background transparent
user315067
source share