HTML and CSS Reference
In-Depth Information
This is the reason why the background of all paragraphs, divisions, and other elements is transparent. Another
example is the bullet type of lists, which is often used without override. If the value of the property list-style-type
is not set by the developer, the initial value is used for rendering, which is disc . However, it can be overridden by
any other allowed values of that property, including circle , square , decimal , decimal-leading-zero , lower-roman ,
upper-roman , lower-greek , lower-latin , upper-latin , armenian , georgian , lower-alpha , upper-alpha , none , and
inherit . The last value, inherit , can be applied not only to list-style-type but also to any other CSS property in
order to explicitly apply the initial value of the corresponding property.
Since the root element has no parent element, its value is set to the initial property value by default.
Default Styles of Rendering Engines
Since the default style sheet of rendering engines contains different property values for certain properties, the
property values that are not declared by the web site developer might look different under various browsers. Because
of the different line heights, margins, font sizes, and other properties, the overall appearance of a web site is typically
not uniform. Although some of the default property values differ slightly only, developers cannot rely on the default
styles of rendering engines.
the inconsistencies between the CSS implementations of browsers can be minimized by overriding the CSS
property values of the default style sheet of rendering engines. this technique is called CSS reset . One of the most
well-known CSS reset files was written and maintained by eric a. Meyer (listing 5-78) and can be used on your web site
for free [22].
Tip
Listing 5-78. A CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a,
abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike,
strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure,
figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
 
 
Search WWH ::




Custom Search