George Ornbo wrote:
> On 3/28/07, david <[EMAIL PROTECTED]> wrote:
>
>   
>> Use a common style sheet, with one (or more) second IE-only stylesheets
>> linked into the HTML via conditional comments. No hacks needed.
>>     
>
> I'd second that. Try and avoid hacks entirely if you can. The box
> model hack is easy enough to avoid if you code defensively. If you
> really need to hack use conditional stylesheets. Hacking in the same
> stylesheet can cause problems in newer browsers, especially IE7.
>   

It can cause problems, but not if you do it right. For instance, if you 
use the star html hack in your main style sheet to feed a rule to IE 6 
and lower, and IE 7 doesn't need the different rule, then there is no 
harm in including it in your style sheet. You're only hacking dead 
browsers at this point, so you're safe. (I suppose you could argue that 
they could add back support for star html to IE 8, but even in that 
extremely unlikely case, you'd have to go back to all your sites anyway 
to fix other things if the IE team was that foolish, so it wouldn't hurt 
to have this one extra hack to fix.)

If, on the other hand, you need that different rule to be read by IE 7 
in addition to IE 6 and lower (which I find is usually the case -- IE 7 
needs almost as many hacks as IE 6), then you're probably best off just 
feeding that rule to all versions of IE via a separate sheet hidden from 
other browsers through conditional comments.

Zoe

-- 
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to