Digital Web Magazine

The web professional's online magazine of choice.

CSS Hack Management

Nick Finck

September 24, 2004 at 10:08 PM

Molly Holzschlag authors a great article entitled Strategies for Long-Term CSS Hack Management at informIT. "Using CSS in a contemporary browser? You'll probably need to use a variety of CSS hacks to accomplish the best possible cross-browser compatibility. Molly Holzschlag helps you determine if you need hacks, how to manage them effectively if so, and which hacks you can employ to solve a range of common compatibility problems." [from Digital Media Minute]

Comments

Christopher Boomer

September 26, 2004 at 9:08 AM

I'm disappointed by the continuing effort on hacking your way out of a problem. I recently encountered this solution for emulating max-width: (500/12) * parseInt(document.body.currentStyle.fontSize)? "30em": "auto" ); in IE using properly documented features if IE and wondered (a) why we don't use them in preference to hacks, and (b) if anyone was aware of great limitations in their use which made this question naive?

Nick Finck

September 26, 2004 at 9:11 PM

Christopher: I think the problem with what you suggest is that those methods are using IE-specific tags (read: propritary) which may work in IE and which may be the only place the developer wants it to work in, but could potentially cause problems in other browsers if implemented in, say, Firefox... and probably implemented slightly different. I understand that the same problems exist in other CSS hacks that people use, so it's 50/50, either way you run the same risk. The popular vote often goes to the technology most developers are familuar with... as sad as that may be. Case in point: why not use javascript to define a max-width.. well, it turns out that many developers that can code CSS and XHTML don't know how to code javascript so they tend to rely on CSS hacks instead. Which is the lesser of two evils, I don't know. No one does.

Kae Verens

September 27, 2004 at 3:57 AM

A very useful tool which does away with most IE-based hacks is the IE7 project, which is becoming more and more stable all the time. We now use it as a matter of course in our company.

Media Temple

via Ad Packs