HTML and CSS Reference
Figure 6-6. Thanks to a quick hack, IE now remembers its place (and the sidebar's).
To see the full example code, take a look at ch6_example_thisaway.html located in the
Source Code/Download section for this chapter at www.apress.com and see what happens in IE
when you remove display:inline; from #main-content and #sidebar-wrapper .
A Sample Layout That Doesn't Need Hacks
Although hacks have their place (and are required to render most complex layouts across mul-
tiple browsers), it is still possible, with a little planning and compromise, to achieve a nice,
not-too-basic layout without the use of any hacks at all.
You accomplish this goal in part with good planning and forethought, and by using the IE
conditional comments. By sending a few minor corrections to IE 6 and earlier (but no hacks),
we can make sure everything is hunky-dory in IE, without using any real hacks (there are some
who might cry foul, but the fact is conditional comments are a supported, if proprietary, func-
tion of IE, and this is one of their intended purposes).
Although there are live sites that don't use hacks ( http://momcbloomington.org is a good
example), they are difficult to track down, and we'd rather show you a live site with a little
more to the layout than the examples we could find online. And since we can't find a live site
with those qualities, we've decided to design and build one from scratch for this section.