Friday 06th of March 2015 12:00:02 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Index

Symbols | A | B | C | D | E | F | G | H | I | J

As stated earlier, it's possible to set percentage values for the margins of an element. Percentages are computed in relation to the width of the parent element, so they change if the parent element's width changes in some way. For example, assume the following, shown in Figure 7-10:

P {margin: 10%;}
<DIV STYLE="width: 200px;">
<P>This paragraph is contained within a DIV which has a width of 200 pixels,
so its margin will be 10% of the width of the paragraph's parent (the DIV).
| 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.

You can use the DOM parser to generate the XML for you if you created an object model that is an adapter on top of DOM. Since your object model uses the document object tree, all the information contained in it is actually stored in the tree. The XML parser can take this tree and convert it to XML for you, you can then save this generated XML to a file. So the DOM parser can generate the ApplicationML file for you.

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.

Client and Server side - Application Servers

Figure 8-56

Figure 8-56. Top-aligning text with a different line height

Before we go any further, let's see what happens when we add box properties to inline elements.

8.4.2.2. Adding box properties

As we're aware

/* This is a CSS1 comment, and itcan be several lines long withoutany problem whatsoever. */

It's important to remember that CSS comments cannot be nested.So, for example, this would not be correct:

/* This is a comment, in which we findanother comment, which is WRONG/* Another comment */and back to the first comment */
didn't collapse margins, resulting in 25-pixel spaces between list items.

Another word to use, if you don't like "collapse," is "overlap." Although the margins are not really overlapping, you can visualize what's happening using the following analogy. Imagine that each element, such as a paragraph, is a small piece of paper with the content of the element written on it. Around each piece of paper is some amount of clear