HTML and CSS Reference
In-Depth Information
■
Here's a good article on reset style sheets, with some links to publicly available styles
Tip
This is particularly important with HTML5 since it introduced a set of new elements types like
nav
and
aside
. Older browsers do not know what these elements are and do not have any reasonable default styles for
them. The biggest problem is that the
display
attribute defaults to inline (placed side-by side) but the style
should be blocked (stacked vertically).
Add the following rule to the top of your
style
element:
/* Reset */
article, aside, footer, header, nav, section
{
display:block;
}
Now press F5 to debug your application and switch to IE7 mode. Your page should now look like Figure
7-8
.
Figure 7-8.
The Demo page after resetting the styles