Forums
View unanswered posts | View active topics It is currently Sat Apr 19, 2014 6:09 am



Reply to topic  [ 5 posts ] 
 CSS3 opacity conflict with PIE 
Author Message

Joined: Mon Aug 01, 2011 12:01 pm
Posts: 3
Post CSS3 opacity conflict with PIE
I am using the rgba opacity code in the .content rule so the background color is transparent, but the other elements (text and images) are not affected:
.content {
padding: 50px 0px;
width: 70%;
float: left;
background-color: rgba(0,0,0,0.5);

But having a conflict with IE: the background color simply doesn't show.
Suggestions?


Mon Aug 01, 2011 12:06 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1430
Post Re: CSS3 opacity conflict with PIE
IE sees the background-color:rgba(0,0,0,0.5) and doesn't know what it means, so it throws it away altogether, treating it like background:none.

You have to use -pie-background:rgba(0,0,0,0.5) so that PIE can see the value and use it.


Mon Aug 01, 2011 12:15 pm
Profile

Joined: Mon Aug 01, 2011 12:01 pm
Posts: 3
Post Re: CSS3 opacity conflict with PIE
so the css code is now:

.content {
padding: 50px 0px;
width: 70%;
float: left;
-pie-background:rgba(0,0,0,0.5);
}

correct? or just:

.content {
padding: 50px 0px;
width: 70%;
float: left;
background:rgba(0,0,0,0.5);
}


Mon Aug 01, 2011 12:32 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1430
Post Re: CSS3 opacity conflict with PIE
You'll want both actually. And to be safe, you could provide a fallback for other browsers that might not recognize rgba:

Code:
.content {
padding: 50px 0px;
width: 70%;
float: left;
background:rgb(0,0,0);
background:rgba(0,0,0,0.5);
-pie-background:rgba(0,0,0,0.5);
}


Mon Aug 01, 2011 1:10 pm
Profile

Joined: Mon Aug 01, 2011 12:01 pm
Posts: 3
Post Re: CSS3 opacity conflict with PIE
awesome. although not tested everywhere, it looks like it's working. my hat to you!


Mon Aug 01, 2011 6:54 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.