Saturday 19th of April 2014 06:41: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: M

margin-bottom property: 7.3.4. Single-Side Margin Properties
margin-left property: 7.3.4. Single-Side Margin Properties
margin property: 7.3. Margins
margin-right property: 7.3.4. Single-Side Margin Properties
margin-top property: 7.3.4. Single-Side Margin Properties
margins: 7. Boxes and Borders
7.3. Margins
collapsing: 7.3.5. Collapsing Margins
block-level elements: Collapsing vertical margins
floated elements: 7.6.1. Floated Elements
horizontal, noncollapsing: 8.2.2. Horizontal Formatting
inline elements and: 7.3.7. Margins and Inline Elements
caution with: 7.3.8. Margins: Known Issues
length values and: 7.3.1. Length Values and Margins
negative (see negative margins)
vs. padding: 7.2. Margins or Padding?
percentages and: 7.3.2. Percentages and Margins
replication: 7.3.3. Replicating Values
single side, setting margin for: 7.3.4. Single-Side Margin Properties
table cells and: 1.3.1. Limited Initial Scope
markers: 8.2.3. List Items
8.2.3. List Items
10.4.2. Markers
matching hyphenated values: Matching hyphenated values
matching single attribute values: Matching single attribute values
max-height property: Limiting width and height
max-width property: Limiting width and height
media types: 1.3.1. Limited Initial Scope
10.8. Media Types and @-rules
Microsoft Internet Explorer (see Internet Explorer)
middle alignment: In the middle
As opposed to the size of a font, which will be discussed in Chapter 5, "Fonts", line-height refers to the distance between the baselines of lines of text -- sort of. In fact, this property determines the amount by which the height of each element's line box is increased or decreased. In the simplest cases, it's a way of increasing (or decreasing) the vertical space between lines of text, but this is a misleadingly simple way of looking at how line-height works. If you're familiar with desktop publishing packages, then line-height
millimeters (mm): 3.2.1. Absolute Length Units
min-height property: Limiting width and height
min-max properties: Limiting width and height
min-width property: Limiting width and height
monospace fonts: 5.1. Font Families
multiple pages, using styles on: 1.2.3. Using Your Styles on Multiple Pages

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.

the background. There is nothing forbidden about this behavior. Thefloating rules we discussed earlier only address the left, right, andtop edges of floats and their parents. The deliberate omission ofbottom edges permits the behavior in Figure 8-40.


In practice, some browsers do not do this correctly. Instead, theywill increase the height of a parent element so that the floatedelement is contained within it, even though this results in a greatdeal of extra blank space within the parent element.permit the creation of elements that are only as wide or tall as theyneed to be in order to display their content, without having toexactly specify how high or wide that will be. We'll explorethis in detail later in the chapter as well.

It is important to remember that the side-offset properties defineoffset from the analogous side (e.g., left definesthe offset from the left side) of the containing block, not from theupper-left corner of the containing block. That's why, forexample, one way to fill up the lower-right corner of a containing you're planning to use styles, it's generally to your advantage to plan ahead and use all of the tools you can. To take the preceding example a little further, suppose that a navigational bar is added to the page. Within this bar, hyperlinks should be yellow, not dark red. If the bar is marked with an ID of navbar, then you need only add this rule:

#navbar A:link {color: yellow;}

This will change the color of hyperlinks within the navigation bar without affecting other hyperlinks throughout the document.

10.2.3. More Pseudo-Classes and Pseudo-Elements

Even though that might seem like it's more than enough, another area of expansion is in pseudo-class and pseudo-element selectors.