在IE6中使用">"选择器

Bob*_*Bob 0 css internet-explorer-6

我编写了一些使用父>子选择器来定位元素的CSS.特别是对于表格,所以我可以像这样对页眉和页脚应用某些样式

table > thead > tr > th ...
table > tbody > tr > td ...
//there are other uses in the css as well
Run Code Online (Sandbox Code Playgroud)

这在IE6中除外,效果很好.为了支持IE6,我最好的解决这个css的方法是什么?

dav*_*gr8 5

如果我想选择E> F,我会使用

E F {
    set-some-style: value;
}

E * F {
    unset-some-style: 0;
}
Run Code Online (Sandbox Code Playgroud)

只有,当你有很多>选择器时,这不能很好地工作.

更多阅读:http: //www.sitepoint.com/blogs/2005/06/20/erics-universal-child-selector/