Forums
|
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
CSS3 opacity conflict with PIE
| Author |
Message |
|
mhdickie
Joined: Mon Aug 01, 2011 12:01 pm Posts: 3
|
 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 |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 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 |
|
 |
|
mhdickie
Joined: Mon Aug 01, 2011 12:01 pm Posts: 3
|
 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 |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 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 |
|
 |
|
mhdickie
Joined: Mon Aug 01, 2011 12:01 pm Posts: 3
|
 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 |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: Bing [Bot] and 1 guest |
|
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
|
|