CSS3 PIE Forums
http://css3pie.com/forum/

PIE in nested div not working when setting background-color
http://css3pie.com/forum/viewtopic.php?f=3&t=119
Page 1 of 1

Author:  Roland [ Tue Aug 17, 2010 2:36 pm ]
Post subject:  PIE in nested div not working when setting background-color

This code will not work in IE (7). When setting blue to transparent it will work. Anyone knows Why??

<html>
<head>
<title>background image CSS3 styling </title>
</head>
<body>
<div style="background-color:blue;border:1px solid red;" >
<br/><br/>
<div style="border: 1px solid #999;-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px;
-moz-box-shadow: 10px 5px 5px black;-webkit-box-shadow: 10px 5px 5px black;box-shadow: 10px 5px 5px black;
behavior: url(PIE.htc);
background-color:white;width:80%;z-index:999;">
Alice was beginning to get very tired of sitting <br />
hot day made her feel very<br /><br />
</div>
<br/><br/>
</div>
</body>
</html>

Author:  Roland [ Wed Aug 18, 2010 1:44 am ]
Post subject:  Re: PIE in nested div not working when setting background-co

After trying all kinds of possible html-constructions, the following had effect (in IE, other browsers had no problems):
I changed the first div style to:

<div style="background-color:blue;border-radius: 20px;behavior: url(PIE.htc);" >

or to get a square first div:

<div style="background-color:blue;border-radius: 1px;behavior: url(PIE.htc);" >

(I used 1px because 0px will not work !!)

Author:  jason [ Wed Aug 18, 2010 1:54 pm ]
Post subject:  Re: PIE in nested div not working when setting background-co

Roland, take a look at the z-index issue described at the top of http://css3pie.com/documentation/known-issues/. This sounds like it's probably what you're running into.

Author:  Roland [ Thu Aug 19, 2010 1:26 am ]
Post subject:  Re: PIE in nested div not working when setting background-co

Had tried that ofcourse (using the z-index) but I overlooked the "position:relative" bit...
Removed the z-index's and changed the first div to :

<div style="position:relative;background-color:blue;border:1px solid red" >

This worked!
Thanks Jason for pointing out the "relative" bit

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/