Results 1 to 4 of 4

Thread: Table Opacity Help

  1. #1
    Join Date
    Aug 2005
    Location
    Nanuet, New York
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Table Opacity Help

    Does anyone know an element for control over table opacity that I can add to a stylesheet?

  2. #2
    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

    Because IE and Mozilla use different methods to control that, both should be used:
    Code:
    table {
    -moz-opacity:0.75;
    filter:alpha(opacity=75);
    }
    Moz opacity values range from 0.00 to 1.00 and alpha opacity from 0 to 100. Unfortunately, alpha opacity has a tendency to make text look a little weird.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry to bring up an old thread, but does anyone know a way to have just the background of the table change in the opacity, and not the contents, like text and images. This would make the effect perfect for what I am trying to do.

    Thanks

  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

    Strictly speaking that is not possible. The opacity of an object is total, background and foreground, including all contained elements. However, tricks may be employed. One is to make the text darker or lighter and bolder than you normally would have them and pictures darker or lighter (using a graphics program). That way, even though the entire containing element is partially transparent, the text and pictures will not appear to be, at least not as much. Whether to make things lighter or darker depends upon what is behind the containing element. Another trick is to use absolute or relative positioning to make things appear to be in the partially transparent element, when they are actually elsewhere.
    - John
    ________________________

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

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
  •