Making semi transparent tables (I have no idea :P)

Soldato
Joined
18 Oct 2002
Posts
3,803
Location
Bristol
Hi i want to go about this, if you saw my previous thread about Iframes you will probably know i dont know much about making websites.

I believe the best way to go about this is to use CSS? I have had a look around the net but there are no clear guides as to how i can apply it to a website.

For the sake of this post i will say i have a webpage with a background image of a car, the website has 1 small table with some text in with a white background, i however want to make the white background semi transparent.

I believe you have to use Alha filters or something like that, any help would be GREATLY appreciated :)
 
yup CSS is the way.

to set 75% opactiy n IE...
Code:
filter: alpha(opacity=75);

and in Mozilla/Safari
Code:
opacity: 0.75;

One main difference is that in IE the opacity value will be assigned to all child elements as well, reguardless of whether they have an opacity value set themselves. In FF/Moz you can give all child elements a separate opacity and it will be applied correctly.

to see it in action try the navigation menu here
 
Nice, but how do i apply that line of code to the table :confused: :(

EDIT: Figured it out now.

HOWEVER, i now get a security warning in internet explorer which i have to accept before it will allow me to see it transparent? How stupid is that!
 
Last edited:
in the document head...
Code:
    <style>
        .semiTrans {
            /* for IE */
            filter: alpha(opacity=75);

            /* for FF/Moz */
            opacity: 0.75;}
    </style>

and in your HTML...
Code:
    <table class="semiTrans">
        <tr>
            <td>hello</td>
        </tr>
    </table>
 
Spunkey said:
in the document head...
Code:
    <style>
        .opaque {
            /* for IE */
            filter: alpha(opacity=75);

            /* for FF/Moz */
            opacity: 0.75;}
    </style>

and in your HTML...
Code:
    <table class="opaque">
        <tr>
            <td>hello</td>
        </tr>
    </table>


Cheers got it now, but i now get the secuirty warning as described above ^^
 
Nope its a background photo, a small table with text in and the transparency settings.

It thinks its Active X or something? :p
 
Ah seems ok, it onl happens when i double click the HTML file on my desktop if i view it from the web the secuirty warning does not appear.

Thanks for your help spunkey :)
 
Acolyte said:
It thinks its Active X or something? :p


It is :) Anything that uses the filter CSS property will use ActiveX.

Strange that it considers it of the same security risk as an untrusted ActiveX program, though.
 
Back
Top Bottom