Jump to content

Transparent Table


master82

Recommended Posts

My site has an image for its background.

The layout consists of tables, and tables within tables... however, once the table is created (or table within a table) it blocks out the background image - which i wish to keep.

So basically...

1) Is there a way I can make a table transparent (clear)? If so, how?

2) Is it also possible to make it semi-transparent? If so, how?

Thanks for your effort :)


EDIT: oh and I cant set a background image for the table because it doesnt follow the pattern of the page background - hence the need for transparency
Link to comment
https://forums.phpfreaks.com/topic/29975-transparent-table/
Share on other sites

Use this CSS: [code]table, tr, td, th {
background: transparent;
}[/code]

Edit: For the "semi-transparency" you can use this (only works in Gecko based browsers though): [code]table, tr, td, th {
-moz-opacity: 0.5;
}[/code] (the value is a percentage displayed as a floating point, i.e. 0.5=50%)
Link to comment
https://forums.phpfreaks.com/topic/29975-transparent-table/#findComment-137829
Share on other sites

ok I have this in my CSS

[code]
.c1 {
width:932px;
background-color:#FFFFFF;
vertical-align:top;
text-align:center;
filter:alpha(opacity=50);
}
[/code]

It does exactly what I want for the background, however it is also making the content of the table (text, images etc) also somewhat transparent...

...is there a way I cant alter this to just the background and not the whole table?

Maybe something like:

[code]
background-color:#FFFFFF alpha(opacity=50);
}
[/code]

Link to comment
https://forums.phpfreaks.com/topic/29975-transparent-table/#findComment-138021
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.