Saturday 26th of July 2014 05:04:52 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 scaling factor:

BODY {font-size: 10pt;}
DIV {line-height: 1.5;}
P {font-size: 18pt;}

When a number is used, the scaling factor is inherited instead of a computed value. This factor is applied to the element and all of its child elements, so that each element has a line-height calculated with respect to its own font-size, as demonstrated in Figure 4-25:

Index: U

U element: 4.1.6. Text Decoration
UA (see user agent)
underlining: 4.1.6. Text Decoration
changing color of: Weird decorations
removing from hyperlinks: 4.1.6. Text Decoration
turned off by browsers: Weird decorations
Uniform Resource Identifier (URI): 3.5. CSS2 Units
Uniform Resource Locators (see URLs)
units: 11.1.3. Case 3: Putting a Magazine Article Online
(see also length units; CSS2 units)
for aural style sheets: 3.5. CSS2 Units
avoiding mixing: 11.1.3. Case 3: Putting a Magazine Article Online
color: 3.6. Summary
universal selector: Universal selector
unordered lists: 7.7.1. Types of Lists
unvisited anchors: 2.4.1. Pseudo-Class Selectors
uppercase text: 4.1.5. Text Transformation
upright text: 5.4.1. Fonts with Style
URI (Uniform Resource Identifier): 3.5. CSS2 Units
URLs (Uniform Resource Locators): 3.4. URLs
HREF attribute and: LINK attributes
referring to in style sheets: 3.4. URLs
specifying for images: 6.2.1. Background Images
user agent (UA): 2.2.2. Grouping Declarations
2.2.2. Grouping Declarations
(see also browsers)
users, selecting alternate style sheets: Alternate style sheets

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.

unordered list and heading will be set to have negative margins:

The larger of the two negative margins (-18px ) is added to the largest positive margin (20px ), yielding (20px-18px = 2px ). Thus, there are only two pixels between the bottom of the list item's content and the top of the paragraph's content. This is what we see in Figure 8-24.

Figure 8-24. Collapsing margins and negative margins, in detail

By defining a set of programming language independent interfaces that allow the accessing and mutation of XML documents, the W3C made it easier for programmers to deal with XML. Not only does XML address the need for a standard information encoding and storage format, it also allows programmers a standard way to use that information. SAX is a very low level API, but it is more than what has been available before it. DOM is a higher level API that even provides a default object model for all XML documents (saving time in creating one from scratch if you are using data is document data).

SAX, DOM and XML are very developer friendly because developers are going to decide whether this technology will be adopted by the majority and become a successful effort towards the goal of interoperable, platform, and device independent computing.

XML is web enabled

XML is derived from SGML, and so was HTML. So in essence, the current infrastructure available today to deal with HTML content can be re-used to work with XML. This is a very big advantage towards delivering XML content using the software and networking infrastructure already in place today. This should be a big plus in considering XML for use in any of your projects, because XML naturally lends itself to being used over the web.

around an image never overlap the plasticsurrounding other elements.)

If you do float atextelement, realize that unless you declare awidth for that element, the CSSspecification says that its width will tend toward zero. Thus, afloated paragraph could literally be one character wide, assumingthat to be the browser's minimum value forfloat for the second column, we'd see a situation like that depicted in Figure 11-8.

Figure 11-8

Figure 11-8. Why we float twice

This is entirely consistent with the rules for floating, but it obviously isn't what we want. By floating the second column, we avoid this possibility altogether, and the columns stay straight.

Now let's place the

Figure 11-18

Figure 11-18. The styled page without any styles Cleaning up

There are a few places where the CSS version isn't quite thesame as the printed version, as a detailed study of Figure 11-17 reveals, and of course the creation of thecolumns is a bit of a hack. How can these be addressed?

The title of the article is the most obvious visual differencebetween the two layouts. The printed version of the article has a