views:

50

answers:

1

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?

+1  A: 

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.

prodigitalson