Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Transparency Problem :/

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34112
    ChickenSpank
    Member

    Alright so im trying to add a little bit of transparency to my wrapping div using this code:
    Code:

    #page-wrap {
    margin: 120px auto;
    width: 960px;
    height: 960px;
    background-color: black;
    zoom: 1;
    filter: alpha(opacity=50);
    opacity: 0.5;
    }

    Now this works but the problem is that the transparency also applies for all the wrapper’s child elements for some reason and I don’t want that.

    So does anyone know why this problem occurs, and how to fix it?

    Thanks in advance for any and all assistance. =)

    #85826

    The opacity property is doing exactly what it should. If you would just like the background color of the #page-wrap div to be transparent then use hsla instead of hex (i.e. background-color: hsla(0, 0%, 0%, 0.75);).

    #85827
    ChickenSpank
    Member

    Thank you so much that did the trick!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.