SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 460 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

By default,
when the page is loaded, the second div cannot be seen in Internet Explorer 6 or below
(see the following left-hand image)??”only by scrolling, selecting content, or resizing the
window can you make the ???missing??? content reappear. In a compliant browser, however,
this problem doesn??™t occur (see the following right-hand image).
Solution: Should you come across this problem when working on your own sites, the solution
is to give layout to the containing div. The best method for doing this is to set the
proprietary zoom property to 1 in a style sheet linked via a conditional comment.
Note that hasLayout issues still affect Internet Explorer 7, although they are thankfully
rarer than in previous versions of Microsoft??™s browser.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
366
Try doing this for the #wrapper rule in the ie6-lte-hacks.css file (see the following code
block), and you??™ll see that the hasLayout problem no longer affects the page??”the content
that wasn??™t initially visible should now be displayed properly.
#wrapper {
zoom: 1;
}
Targeting other browsers
Generally, targeting browsers other than Internet Explorer is unnecessary. All other currently
shipping browsers are pretty well behaved. However, under extreme circumstances,
there are exceptions. For users who still have to deal with Internet Explorer for Mac, you
can create overrides by importing a style sheet via a style element, but omitting url and
leaving no space between @import and the opening bracket: