The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Transparency Problem :/
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. =)
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);).
Thank you so much that did the trick!