
Global CSS Background Color Causing Problem in IE7
In IE7 (IE7 mode of IE9, that is), the inner divs' shadows disappear, apparently because of a background color defined in the site's global CSS.
Without modifying that global style (if possible), how would I make the backgrounds appear for the inner divs in IE7?
Thanks,
Jamie
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<style>
/* global css */
html, body {
background: #FFFFEF;
}
/* my experiment */
.shadow {
background-color: white;
border: 1px solid #00477f;
box-shadow: 0px 0px 6px rgba(0,0,0,0.8);
-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.8);
-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.8);
behavior: url(PIE.htc);
}
.inner {
margin: 10px;
float: left;
}
#outer-jj {
height: 150px;
}
#inner-jj-1 #inner-jj-2 {
height: 100px;
}
</style>
</head>
<body>
<div class="shadow" id="outer-jj">
<p>Hi, this is inside outer-jj.</p>
<div class="shadow inner" id="inner-jj-1">
<p>Hi, this is inside inner-jj-1.</p>
</div>
<div class="shadow inner" id="inner-jj-2">
<p>Hi, this is inside inner-jj-2.</p>
</div>
</div>
</body>
</html>