HTML and CSS Reference
In-Depth Information
Figure 4-2. Internet Explorer box-model behavior, resulting in a total element width of 300 pixels
Internet Explorer 6 added support for a concept known as DOCTYPE switching, wherein the
rendering of the page changes based on the DOCTYPE of the document. IE 6 has two rendering
modes: standards compliance mode is enabled when a strict DOCTYPE is used and quirks mode
is enabled when a strict DOCTYPE is not used. IE 6 uses the correct box-model implementation
when in standards compliance mode and the incorrect one when in quirks mode. This is one
of several reasons why it is always preferable to use strict DOCTYPE s—rendering engines in
standards compliance mode produces much more predictable and consistent behavior than
those in quirks mode.
Inconsistent Support for :hover
The :hover pseudo-class (first discussed in Chapter 2) allows CSS authors to define different
CSS properties for an element when that element is “hovered,” or “moused-over.” Usually this
is done to indicate that the element the visitor has rolled their mouse over is a clickable, linked
element. Per the CSS spec, CSS authors should be able to assign :hover to any element. How-
ever, IE only supports the use of :hover on anchor elements ( a ). One example of a common use
for :hover is to highlight rows of a table that are hovered, often by changing their background
color. This usability aid is not possible in IE without the use of JavaScript because of IE's lim-
ited support for :hover .
Missing Support for position: fixed
When positioning elements in CSS, an author may choose to use the fixed positioning model.
Fixed positioning works in a similar way to absolute positioning, except that when a visitor
scrolls the page the element does not scroll with it (it is “fixed” in place). IE 6 and lower do not
support fixed positioning and display elements whose position property is set to fixed as static
Search WWH ::

Custom Search