Friday 20th of April 2018 04:44:20 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

also allows browsers to set a minimum value forwidth, below which a block-level element'swidth cannot drop. The value of this minimum canvary between browsers, as it is not defined in the specification.

8.2.2.2. Using auto

If only one of width ,margin-left, or margin-right is 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: P

padding: 7. Boxes and Borders
7.5. Padding
background and: 7.5. Padding
inline elements and: 7.5.3. Padding and Inline Elements
vs. margins: 7.2. Margins or Padding?
percentage values and: 7.5.1. Percentage Values and Padding
single-side: 7.5.2. Single-Side Padding
padding-bottom property: 7.5.2. Single-Side Padding
padding-left property: 7.5.2. Single-Side Padding
padding property: 7.5. Padding
padding-right property: 7.5.2. Single-Side Padding
padding-top property: 7.5.2. Single-Side Padding
page-break-after property: 10.8.1. Paged Media
page-break-before property: 10.8.1. Paged Media
page-break-inside property: 10.8.1. Paged Media
page size: 10.8.1. Paged Media
paged media: 1.3.1. Limited Initial Scope
10.8.1. Paged Media
panning mechanisms: 9.1.4.1. Overflow
parents: 2.5. Structure
percentage colors: 3.1.2.1. Percentage colors
list of percentages: 3.1.2.1. Percentage colors
percentage units: 3.3. Percentage Values
percentage values for background positioning: 6.2.3.2. Percentage values
perfect alignment of backgrounds: 6.2.5.1. Interesting effects
period (.)
in automatic numbering: 10.4.1. Automatic Numbering
in class selectors: 2.3.1. Class Selectors
picas (pc): 3.2.1. Absolute Length Units
pitch property: 10.8.2. The Spoken Word
pitch-range property: 10.8.2. The Spoken Word
pixels-per-inch (ppi): 5.3.5. Using Length Units
pixels (px): 3.1.2. Colors by RGB
3.2.2.3. Pixel lengths
setting font size in: 5.3.5. Using Length Units
points (pt): 3.2.1. Absolute Length Units
problems for document design: 5.3.5. Using Length Units
setting font size in: 5.3.5. Using Length Units
position keyword equivalents: 6.2.3.1. Keywords
position property: 9.1.1. Positioning Schemes
positional equivalents: 6.2.3.2. Percentage values
positioned elements, stacking: 9.5. Stacking Positioned Elements
positioning: 9. Positioning
absolute: 9.3. Absolute Positioning
fixed: 9.4. Fixed Positioning
height/width and: 9.1.3. Width and Height
relative: 9.2. Relative Positioning
positioning backgrounds: 6.2.3. Background Positioning
positioning elements: 1.3.1. Limited Initial Scope
positioning schemes: 9.1.1. Positioning Schemes
pound sign (see octothorpe)
ppi (pixels-per-inch): 5.3.5. Using Length Units
print document, putting online: 11.1.3. Case 3: Putting a Magazine Article Online
properties: 2.1.1. Rule Structure
2.1.3. Declarations
new with CSS2: 10.9. Summary
pseudo-class selectors: 2.4.1. Pseudo-Class Selectors
combining with class selectors: 2.4.1. Pseudo-Class Selectors
new with CSS2: 10.2.3. More Pseudo-Classes and Pseudo-Elements
10.9. Summary
restrictions on: 2.4.3. Restrictions on Pseudo-Class and Pseudo-Element Selectors
pseudo-classes: 2.4.1. Pseudo-Class Selectors
2.4.3. Restrictions on Pseudo-Class and Pseudo-Element Selectors
specificity and: 2.7.1. Inheritance and Specificity
pseudo-element selectors: 2.4.2. Pseudo-Element Selectors
CSS properties permitted on: 2.4.3. Restrictions on Pseudo-Class and Pseudo-Element Selectors
new with CSS2: 10.2.3. More Pseudo-Classes and Pseudo-Elements
10.9. Summary
restrictions on: 2.4.3. Restrictions on Pseudo-Class and Pseudo-Element Selectors
pseudo-elements: 2.4.1. Pseudo-Class Selectors
2.4.2. Pseudo-Element Selectors
2.4.3. Restrictions on Pseudo-Class and Pseudo-Element Selectors
specificity and: 2.7.1. Inheritance and Specificity
pull quote: 11.1.3. Case 3: Putting a Magazine Article Online


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.

elements, and margins are no exception. For example, in CSS-enabled browsers, the "blank line" above and below each paragraph element is generated using margins. Therefore, if you don't declare margins for the P element, the browser may apply some margins on its own -- which is to say that just because you don't declare margins for an element doesn't mean that there won't be any.

You can also declare a margin to be auto. For now, set to text/css. This value describes the type of data that is to be loaded using the LINK tag. That way, the web browser knows that the 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

/*   assume only two faces for this example: 'Regular' and 'Bold'   */
P {font-weight: 100;}   /* looks the same as 'normal' text */
P SPAN {font-weight: bolder;}   /* maps to '700' */

As we can see, the weight 100 is assigned to the normal font face, but the value of font-weight is still 100. Thus, the SPAN text (which is set to be bolder) will inherit the value of 100 and then evaluate to the next-heaviest face, which is the Bold face and which has a numerical weight of