Reputation: 46350
I hae the following CSS selector:
.section h1,
.section > div:first-child
{
background-color: #E5E5E5;
border-bottom: solid 1px #CCCCCC;
padding: 3px;
text-align:left;
font-weight:bold;
}
Now I know that the first-child and the > selectors do not work in IE6, but .section h1 does. My problem is that in IE6, the .section h1 does not get applied because of the .section > div:first-child. Is there any way to specify both without breaking IE, and without specifying the entire style twice?
Upvotes: 0
Views: 121
Reputation: 33
Yep, separate them out as prodigitalson says. Since IE doesn't recognize the ":first-child", it just "jumps" out and continues to the next declaration.
Upvotes: 2
Reputation: 60413
Put them in seperate declarations. OR better yet use a conditional comment to include an ie6 only stylesheet after you main one that contains the same definition for .section h1
only.
Upvotes: 1