Web Development

General discussion


CSS: To hack or not to hack

By MaryWeilage Editor ·
In this week's Design and Usability Tactics newsletter, author Michael Meadhra explains why he avoids using hacks whenever possible. He also offers how to select a hack when there is no other way to achieve an acceptable result in today's major browsers.

How do you deal with CSS hacks? What hacks do you use and why? What strategies do you use to avoid or minimize hacks?

If you aren't subscribed to the free Design and Usability Tactics newsletter, click the following link to automatically sign up:

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -


I like the advice about using hack code - don't do it.

If you've written enough code, you'll eventually exploit a vulnerability or two - but as a coding guideline, it's not a good idea.

I used to answer the question "can it be done" honestly, knowing that there was some hack or something. Eventually I developed the skill of saying "no", knowing that hacks tax your street cred when they fail - and they always, eventually fail.

Collapse -

Be pragmatic sometimes

by C_Tharp In reply to Credibility

Excellent reply Mr. Kaufman.

While it is best to avoid hacks, sometimes you have to use them to get a job done within the allowed time. When you do, isolate the hack and document it so that it can be replaced later with a standard solution.

We have all seen requirements for which we do not have a standard solution. When that occurs, there may not be time to find or develop one. Use a hack to get the job done, then find a standard solution and put it in place before the hack presents a problem.

Collapse -


by zkent In reply to CSS: To hack or not to ha ...

I wonder how current pixel-based css will be handled in Longhorn? I hear its new graphics engine (Avalon, I think its called) is no longer pixel-based.

Collapse -


by noel In reply to pixels

CSS will have nothing to do with Avalon in the same way that it does now. Avalon uses a new system of measurements that are more like svg from what I've read. I could be wrong... its early, and I've only had my first glass of pepsi.

Related Discussions

Related Forums