Jump to content

Nested Divs And Parent Opacities?


MrFish
 Share

Recommended Posts

I'm trying to make a template that has a translucent border around it. I have a div that is around my template that is called "wrapperRounded" and it's opacity is set to 60%. The problem is, all divs inside of this will also have the same opacity. I forgot about this when I wrote it. How can I get it so the other divs don't have the parent div's opacity?screenshotyk.png

#wrapperRounded{	width: 800px;	padding: 5px;	background-color: #039;	float: left;	filter:alpha(opacity=60);	opacity: 0.6;	-moz-opacity: 0.6;	-webkit-opacity: 0.6;	-op-opacity: 0.6;}#header{	width: 800px;	height: 125px;	background-color: #fff;}

Link to comment
Share on other sites

The default background color for the embedded elements is transperent :) So it appears to be having the same opacity, though it actually lacks some intended background. If you apply, say background-color:#ffffff; to every child, then it should work :)

Edited by Jack McKalling
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...