effect, this declaration will work just fine. Figure 11-9 reveals the result.

Figure 11-9

Figure 11-9. Floating images

As you can see, the first column is now quite a bit longer than thesecond. However, since we haven't done much of anything to thesecond column, let's leave things as they are for the moment.

An offset block of text showing a quotation in a larger size isusually called a "pull quote." We have one near themiddle of the second column, so let's decide how that will be Friday 20th of April 2018 04:32:22 PM

by Eric A. Meyer
ISBN 1-56592-622-6
First edition, published May 2000.
(See the
catalog page for this book.)

Search the text of Cascading Style Sheets: The Definitive Guide.

Table of Contents

Copyright Page
Preface
Chapter 1: HTML and CSS
Chapter 2: Selectors and Structure
Chapter 3: Units and Values
Chapter 4: Text Properties
Chapter 5: Fonts
Chapter 6: Colors and Backgrounds
Chapter 7: Boxes and Borders
Chapter 8: Visual Formatting
Chapter 9: Positioning
Chapter 10: CSS2: A Look Ahead
Chapter 11: CSS in Action
Appendix A: CSS Resources
Appendix B: HTML 2.0 Style Sheet
Appendix C: CSS1 Properties
Appendix D: CSS Support Chart
Index
Colophon
Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

determined. This will let the element be as tall as necessary todisplay its content, no matter how narrow it gets (never less than15em, of course!).

We can turn this around to keep elements from getting too wide ortall by using max-width andmax-height. Let's consider a situationwhere, for some strange reason, we want an element to havethree-quarters the width of its containing block, but to stop gettingwider when it hits 400 pixels. The appropriate styles are:

margin can accept any length measure, whether in pixels, inches, millimeters, or ems. However, the default value for margin is effectively 0 (zero), which means that if you don't declare a value, then by default, there won't be a margin.

TIP

In practice, browsers come with pre-assigned styles for many elements, and margins are no exception. For example, in CSS-enabled browsers, the "blank line" above and below each paragraph the element. Let's go back to the small yin-yang symbol:

BODY {background-image: url(yinyang.gif);
background-repeat: no-repeat;
background-position: top right;}

Incidentally, the result, shown in Figure 6-37, would have been exactly the same had the position been declared as right top. When using the position keywords, they can appear in any order, so long as there are no more than two of them, one for the horizontal and the other for

Depending on which of the three options you use to access information using your Java classes, this information must at some point be saved back to a file (probably to the one from which it was read). When the user of your application invokes a File->Save action, the information in the application must be written out to an ApplicationML file. Now this information is stored in memory, either as a (DOM) tree of nodes, or in your own proprietary object model. Also note that most DOM XML parsers can generate XML code from DOM document objects (but its quite trivial to turn a tree of nodes into XML by writing the code to do it yourself). There are 2 basic ways to get this information back into an ApplicationML file:

There are advantages and disadvantages to using some of the strategies to import and export XML. The complexity of your application data and available system resources are factors that would determine what strategy should be used.

marginIE4 P/P IE5 P/Y NN4 B/B Op3 Y/-

This setsthe size of the overall margin of an element. Vertically adjacentmargins of block-level elements are collapsed to be as large as thelargest margin, whereas inline elements effectively do not takemargins (they are allowed, but have no effect on page layout). Onlythe left and right margins of inline elements have any effect, andare not collapsed. Margins set on floated elements are not collapsedwith other margins under any circumstance. Negative values arepermitted, but caution is recommended.