Adam Ducker wrote: > Erik Vorhes wrote: > >> Whether you end up going with CSS hacks or conditional comments is >> your decision (though I prefer conditional comments because I know >> what I'm getting that way, and there aren't as many potential >> surprises). > > I second this as well, Chris. Only use a hack when you've exhausted all > other possibilities. A conditional statement clearly will work for you > and is a much safer approach. As a bonus it will allow you to still > validate your styles to make sure you haven't made any mistakes on > accident. You won't find yourself with a list of errors you simply > ignore because you introduced them on purpose... > > -Adam Ducker (http://adamducker.com)
Is this not valid CSS? * html div { background: green; } The element tree for standard compliant browsers is. <html> <head>...</head> <body>...</body> </html> The element tree for IE6 and IE7 is. <hidden-container> <html> <head>...</head> <body>...</body> </html> </hidden-container> Thus why this selector works. * html div { background: green; } /* IE6- */ and with the inclusion of a <!DOCTYPE> in the HTML, this selector works. *+html div { background: green; } /* IE7 */ These hacks are not a bug in IE7 or earlier but are targeting a hidden container in the element tree. -- Alan http://css-class.com/ Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/