Thursday 27th of October 2016 06:50:44 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: 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
that's quite true. However, consider the following, depicted in Figure 8-19:

igure 8-19. Wider children through negative margins

Yes, the child element is wider than its parent! This is mathematically correct: 10 + 50 = 400. Even though this leads to a child element sticking out of its parent, technically the specification hasn't been violated, because the values of the seven properties add up to the required total. It's a semantic dodge,

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.

order to get float to work with text elements, youneed to explicitly declare a width as well, likeso: width: 10em . To be honest,I'm not sure why this should permit floating where itwouldn't otherwise happen. It does make some sense, given theusual desire for declaring a width on floated textelements in any case, but the specification does notrequire that a width bedeclared in order to make a text element float successfully. InternetExplorer 4.x for Windows does.

Let's revisit that example for a moment:

H1 {margin: 0.5em 10% 0.5em 10%;}

Seems a little redundant, doesn't it? After all, you have to type in the same pair of values twice. Fortunately, CSS offers an easy way to avoid this.

7.3.3. Replicating Values

In order to successfully load an external style sheet, LINKmust be placed inside the HEAD element but may notbe placed inside any other element, rather likeTITLE or STYLE. This will causethe web browser to locate and load the style sheet and use whateverstyles it contains to render the HTML document, in the manner shownin Figure 1-2.

And what is the format of an external style sheet? It's simplya list of rules, just like those we saw in the previous section andHTML file, but you could reference an image in another directory by its relative or absolute path.  You can even specify the URL for an image located on another server, which is more honest than stealing a copy but makes your page depend on the other server remaining operational. For better layout control, specify image dimensions, horizontal and vertical padding space (in pixels, 72 pixels/inch),alignment, etc. 
HSPACE=10 VSPACE=5 ALT="Ugly Guy!" SRC="ugly2.gif"> Specifyinglist-item element. The exact behavior in this circumstance is notdefined in CSS.

list-style-typeIE4 Y/Y IE5 Y/Y NN4 Y/P Op3 Y/-

This is used to declare the type ofbullet numbering system to be used in either an unordered or orderedlist, depending on the value specified. This property applies toelements with a display value oflist-item.