CSS hacks and filters (was RE: [thelist] NN4.x and IE4.x)

Saila, Craig csaila at globeandmail.ca
Mon Jul 28 09:04:47 CDT 2003


Diane Soini wrote:
> Anyway, I really am curious who really does all that CSS hacking

Depends on the site. My personal site I rely more on conditional
comments to serve styles to IE, and code to support Mozilla/Opera (I
basically ignore fourth generation browsers). 

On commercial sites that require pixel-identical support for NN4 thru IE
6, I tend to:
 - use a DOCTYPE that puts browsers in strict mode (so IE 6, IE5/Mac,
Safari, Mozilla, and Opera work basically the same); 
 <http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html>
 - use the simplified box model hack to set widths for IE 5 and IE 5.5
on Windows; 
 <http://centricle.com/ref/css/filters/tests/sbmh/>
 - and use a separate NN4 style sheet (called via JavaScript, or hidden
using the Fabrice's Inversion), or use Caio's Hack (or "html * {
declaration; }") to hide individual rules. 
 <http://centricle.com/ref/css/filters/tests/fabrice/>

Even in those cases were filters/hacks are used, they are used quite
minimally. Whenever possible I avoid creating "pixel-identical" sites.

> stuff. If I don't do it, am I hindering my career?

Not likely, but it depends on:
 - what browser's your client wants to support (fourth generation,
fifth, or sixth-plus). The older the generation the more they come in
handy; 
 - and whether complex, pixel-identical sites are required.

The most important thing is to know the quirks of different browsers, so
when problems are encountered you can fix them by adjusting the CSS or,
if necessary, use the appropriate filter/hack.

-- 
Cheers,

Craig Saila
------------------------------------------
craig at saila.com : http://www.saila.com/
------------------------------------------ 


More information about the thelist mailing list