Friday 27th of March 2015 12:42:56 AM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | 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

Index: X

x-height: em and ex units
XML (Extensible Markup Language): 1.2.6. Preparing for the Future
display property and: 2.9.1. Why Does the display Property Exist?
selectors in: 2.1.2. Simple Selectors


H2 {font-size: 200%;}H3 {font-size: 36pt;}


xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | <length> | <percentage>

oblique, or normal text. Italic text is generally a defined font facewithin the font itself, whereas oblique text is less often so. In thelatter case, the user agent can compute a slanted font face.

Symbols | 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

Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

BODY {background-image: url(bigyinyang.gif);background-repeat: no-repeat;background-position: center;}
Figure 6-36

Figure 6-36. Centering a single background image

This positioning is all done usingbackground-position, ofcourse, but there are a whole lot of ways to supply values for thisproperty. First off, there are the keywords top,bottom , left,right, and center. Usually, uncertain. Assume that the specified height is greater than thatneeded to display the content:

<P STYLE="height: 10em;">

In this case, then the extra height is treated somewhat like extrapadding, as depicted in Figure 8-3.

Figure 8-3

Figure 8-3. Setting the height property for block-level elements

If, on the other hand, the height isless than that needed to display the content: case, the relation is "stylesheet."TYPE is alwaysset to text/css. This value describesthe type of data that is to be loaded using theLINK tag. That way, the web browser knows that thestyle sheet is a CSS style sheet, a fact that will determine how thebrowser deals with the data it imports. After all, there may be otherstyle languages in the future, so it will be important to say whichlanguage you're using.

Another important point is that when an element is positioned, itestablishes a containing block for its descendantelements. For example, we could absolutely position an element andthen absolutely position one of its children, as shown in Figure 9-23.

Figure 9-23

Figure 9-23. Nested absolutely positioned elements

The small box B in the lower-left corner of the element A is a childof A, which is in turn a child of a relatively positionedDIV. B was absolutely positioned, as was elementA, using styles like these: