Results 1 to 5 of 5

Thread: Table transparency

  1. #1
    Join Date
    Sep 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Table transparency !HELP!

    <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
    Last edited by hossfly; 09-30-2004 at 12:32 PM. Reason: not right

  2. #2
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    I don't think that it is possible to make the text darker and see-through.

    -magicyte

  3. #3
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    bgcolor is a deprecated attribute, use CSS for this.

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

    Try this ammendment:
    Code:
    <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.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Aha! I knew you couldn't change the opacity of the text in that script! I KNEW it!!!

    -magicyte

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •