The Internet Explorer 5 box model (p. 156) problem is a famous example of the
unnecessary use of hacks. Many complicated hacks (p. 405) were developed to solve
this problem, but with a simple design change??”the addition of padding to the
parent of an element with a fixed width, instead of to the element itself??”designers
could have avoided the problem altogether.1 This approach wasn??™t possible in every
case, but the option was there.
Avoiding Implementation Pitfalls
If you find yourself in a position where you have no choice but to use a workaround,
filter, or hack, be aware of the dangers involved. Your chosen hack may be
unreliable??”in the future, it may actually cause more problems than would have
resulted had you not used it at all. As newer browser versions are produced, new
features are implemented, and bugs are fixed, the hack mechanism you??™ve been
using may cease to work. Also consider the maintenance issues that can arise when
many hacks are spread throughout a style sheet.
Pages:
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569