CSS, opacity..

I have div1 and div2.

div1 is set to opacity: 0.6;

Question: How can get rid of the opacity at .div2 p{...}?

Can I somehow cancle the opacity set at div1?

Thank you.
<div class="div1">

     <div class="div2">
          <p>
                 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed dia...
         </p>
    </div>

</div>

CSS:
.div1 {
	background-color: black;
	opacity: 0.6;
	height: 200px;
}

.div2{
	padding-top:60px; 
	padding-left: 30px;
	padding-right: 30px;
}

.div2 p{
	margin-top:0px;
	background-color: black;
	opacity: 1.0;
	border-radius: 5px;
	color: red;
	padding-top: 10px;
	padding-left: 10px;
	padding-bottom:10px;
	padding-right:10px;
}

Open in new window

LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
http://jsbin.com/rarej/1/edit?html,css,output
.div1 {
	background-color: rgba(0,0,0,.6);
	/*opacity: 0.6;*/
	height: 200px;
}

.div2{
	padding-top:60px; 
	padding-left: 30px;
	padding-right: 30px;
}

.div2 p{
	margin-top:0px;
	background-color: black;
	opacity: 1.0;
	border-radius: 5px;
	color: red;
	padding-top: 10px;
	padding-left: 10px;
	padding-bottom:10px;
	padding-right:10px;
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Thank you, Solution is perfect.

How long this links remains active?

Mike
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I don't control jsbin so it is up to them.  I don't believe they ever come down but wouldn't rely on it.  The links to experts-exchange should always be good.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.