PDA

View Full Version : Table transparency



hossfly
09-29-2004, 03:13 PM
<body bgcolor="black">
<table>
<td>
hello hello<br>
hello hello<br>
hello hello<br>
</td>
</table>

<style type="text/css">
table { -moz-opacity:50% ; filter:Alpha(Opacity=50);background-color:darkblue;}
</style>

------------------
I need a help with this script, it doesnt just make the table bg semi-transparent, it makes it and everything inside of the table the same level of transparency. I only need to the background to be transparent.

Note: The website that i am using this script on doesnt allow me to edit the tables. just the css script. so i cant just use <td>hello</td>. It has to be done with the css script :/. please help

magicyte
07-08-2008, 06:47 PM
I don't think that it is possible to make the text darker and see-through.

-magicyte

rangana
07-09-2008, 12:19 AM
bgcolor is a deprecated attribute (http://www.codehelp.co.uk/html/deprecated.html), use CSS for this.

FF, understands opacity so -moz-opacity is'nt needed at all.

Try this ammendment:


<body style="background:#000;">
<table>
<td>
hello hello<br>
hello hello<br>
hello hello<br>
</td>
</table>
<style type="text/css">
table
{opacity:0.5;filter:Alpha(Opacity=50);background:#008;}
</style>


Highglighted are the changes. P.S. Use hex color value.

Hope it helps.

jscheuer1
07-09-2008, 02:46 AM
Opacity is tricky. If you apply it to an element, it affects the entire element and there is no way to separate it into foreground and background. Even worse, in some browsers it makes text look sickly.

Although from your remarks I doubt that you can do this, one way to achieve the result you are after is to superimpose one table with no opacity and no background over an otherwise identical table with your desired background and opacity.

magicyte
07-09-2008, 09:15 PM
Aha! I knew you couldn't change the opacity of the text in that script! I KNEW it!!!

-magicyte