HTML and CSS Reference
In-Depth Information
be used to target almost any browser and version). Though we recommend against relying on
filters by default (you shouldn't have to if you follow the standards-first process), they can
come in handy, especially when you have to support an older browser (some popular hacks
even incorporate filters, like the earlier example targeting IE/Mac). And because filters can be
kept in separate style sheets just like any other hack (some filters actually control which browsers
can “see” a style sheet to import), you can properly isolate them, continuing to keep your pri-
mary style sheet clean and crisp.
Covering all available filters and variations could take an entire topic (and this isn't it), but
thankfully Kevin C. Smith maintains a very up-to-date browser compatibility matrix of known
filters ( www.centricle.com/ref/css/filters/ ), which should provide you with all the informa-
tion you need if you absolutely must filter your styles. For quick access to a few de facto filters,
check out Tantek Çelik's list ( www.tantek.com/CSS/Examples/ ).
IE 7 “Fixes” You Need to Be Aware Of
Although IE 7 is a huge improvement over previous versions (serious kudos to the IE 7 devel-
opment team for all their hard work, and for listening to the web standards community
throughout the process), some of the fixed bugs and changes to the rendering engine mean
some of the most popular hacks still in widespread use today will not work .
The most important of these is the Star HTML hack, which takes advantage of a bug in the
rendering engines of older versions of IE, and is used by many developers, including your
esteemed authors. This hack does not work in IE 7 (this has been confirmed by the IE 7 devel-
opment team), so if for some reason you are not using IE conditional comments to separate
your hacked styles, expect to spend some time working around this issue for your existing
sites (but we know you'll be separating your hacks like the good web developer that you are
after reading this chapter).
In the event you would still like to explore the possibility of hacks that specifically target
IE 7, take a look at Brothercake's Triple-X hack (which works as of IE 7 beta 2; see http://
brothercake.co.uk/site/resources/reference/xxx/ ) and remember to check everything once
IE 7 has officially shipped.
Hacking a Real-World Layout
As we mentioned at the beginning of this chapter, hacks are a necessary evil employed to
ensure cross-browser layout equality, or more simply, hacks help us make things look right for
everyone. One basic example is the “Thisaway” template series one of the authors, Dan Rubin,
designed for Blogger, Google's popular weblog application. We'll look at some layout issues
Dan encountered with it, and how he solved them (for another example using multiple hacks
to solve a variety of layout problems, see Chapter 14).
Search WWH ::




Custom Search