Prev | Current Page 556 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

If your web page looks as you intended in one browser but
not another, you may be tempted to think that the browser that??™s not displaying
your site properly has a CSS bug, but of course the exact opposite is equally likely.
Consider, for instance, the fact that different browsers apply varying default margin
and padding values to HTML elements like headings and list items. You??™ll often
see sites on which CSS hacks are used to apply particular rules to different browsers
simply because the designers weren??™t aware of the variations in these values. The
use of CSS hacks in these kinds of situations is redundant; simply spending a few
minutes to gain an understanding of the margin and padding rules would negate
the need to apply hacks.
393 Workarounds, Filters, and Hacks
If you??™re sure that you have a valid CSS rendering problem, and you??™re tempted to
use a hack, first see whether a change of design could enable you to avoid the issue
altogether. If you can design layouts that don??™t depend on problematic CSS features,
in most cases you won??™t need hacks at all.


Pages:
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568