CSS Background Problem in IE with Nested Divs
Posted: 2005-02-10 06:21pm
Okay, I normally use Firefox, so when first coding this bunch of stuff, it didn't seem anything was wrong. Then I go over to IE and lo and behold, the innermost divs in this series don't display their backgrounds!.
The problem comes with the div.presents and div.title DIVs -- they simply don't display any background color that's attributed to them. Anyone know what's up? Doesn't happen in Firefox, just IE.
Code: Select all
<div id="container">
<div id="center">
<div id="header">
<div class="presents">Stuff here</div>
<div class="title">More stuff here</div>
</div>
</div>
</div>
Code: Select all
#container {
position: absolute;
width: 100%;
text-align: center;
}
#center {
position: relative;
width: 800px;
margin: 0 auto;
}
#header {
background: #349934;
border-top: 1px solid #B4B4B4;
border-left: 1px solid #B4B4B4;
border-right: 1px solid #5a5a5a;
border-bottom: 1px solid #5a5a5a;
padding-bottom: 10px;
margin-bottom: 8px;
}
.presents {
background: #1A4D1A;
padding: 1px;
font-weight: bold;
text-align: center;
}
.title {
text-align: center;
font-size: 20px;
letter-spacing: 4px;
}