I’m using .class1.class2 .class3 selector, where .class1.class is a combination selector and .class3 belongs to a descendant. works fine in FF, but on IE7, it doesn’t work.
In the css below, the second style is always shown in IE. any solution?
<STYLE type="text/css">
.test1.test2 .test3{
width:90px;
height:100px;
}
.test4.test2 .test3{
width:900px;
height:100px;
}
</style>
<div class="test1 test2">
<button value="test" class="test3"/>
</div>
That style should work perfectly on IE7+. As Pekka said in the comments there is a small problem with IE6. I’m guessing that you’re not using the strict doctype perhaps?
In which case, you deserve everything you get 😮
Just add
<!doctype html>to the start of the HTML file and everything should be fine.