Sunday 25th of February 2018 10:11:47 PM

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: K

keywords: 2.1.3. Declarations
for background positioning: 6.2.3.1. Keywords
multiple: 2.1.3. Declarations
number: 5.2.1. How Weights Work
transparent: 6.1.2. Background Color
kursiv text: 5.4.1. Fonts with Style


Symbols | A | B | C | D | E | F | G | H | I | J | K | L DIV which has no padding, borders, or margins. Theresult will be as shown in Figure 8-42.

Figure 8-42

Figure 8-42. Floating with negative margins

Contrary to appearances, this does not technically violate therestrictions on floated elements being placed outside their parentelements. Here's the technicality that permits this behavior: aclose reading of the rules listed earlier will show that the outeredges of a floating element must be within the element'sparent. However, negative margins can place the floated | 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.

style sheet is a CSS style sheet, a fact that will determine how the browser deals with the data it imports. After all, there may be other style languages in the future, so it will be important to say which language you're using.

Next we find the HREF attribute. The value of this attribute is the URL of your style sheet. This URL can be either absolute or relative, depending on what works for you. In our example, of course, the URL is relative. It could as easily have beenelement with the specified attribute. For example, you can match all anchors with a NAME attribute, or all IMG elements with a BORDER attribute, or all elements that have a class of some type:

A[name] {color: purple;}      /* colors any NAME anchor purple */
IMG[border] {border-color: blue;}  /* sets blue border for any bordered IMG */
[class] {color: red;}        /* sets any classed element red */

In none of these situations does it matter what value is assigned to the attributes of each element. As long as the given attribute is

  • If 600 is unassigned, it is given the next variant darker than 400. If no darker variant is available, 600 is assigned the same variant as 500. This method is also used for 700, 800, and 900.

  • In order to understand this more clearly, let's look at three