Book Home Tuesday 09th of February 2016 04:38:27 PM Cascading Style Sheets: The Definitive GuideSearch this book

Full Text Search

2px , then a medium-width border will always be two pixels wide, whether the border surrounds an H1 or a P element. Figure 7-36 illustrates one way to handle these three keywords, as well as how they relate to each other and to the content they surround.

Figure 7-36

Figure 7-36. The relation of border-width keywords to each other

Let's suppose a paragraph has margins, a background color, and a border style set as shown in Figure 7-37:

ARCHIVE = "qagent.zip" NAME = "SearchApplet" WIDTH = 600 HEIGHT = 360 >

If you are having difficulty searching, or if you have not used this search utility before, please read this.


Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

That leaves only an explanation of the difference between italic and oblique text. For that, it's easiest to turn to Figure 5-24, which illustrates the differences very clearly.

Figure 5-24

Figure 5-24. Italic and oblique text in detail

Basically, italic text is in some way its own font, with small changes made to the structure of each letter to account for thebeen possible to float images by declaring, for instance,<IMG SRC="b5.gif"align="right">. This causes an image to floatto the right, and allows other content (text or other images) to"flow around" the image. In the past, this was onlypossible with images and, in some browsers, tables. CSS, on the otherhand, allows any element to float, from images to paragraphs tolists. In CSS, this behavior is accomplished using the propertyfloat.

CLASS="tbot" ALT="short image"> short image.</P>
Figure 4-35

Figure 4-35. Text-bottom alignment

4.1.3.4. Getting on top

Employing vertical-align: top has pretty much the opposite effect of bottom . Likewise, vertical-align: text-top is the reverse of text-bottom . Figure 4-36 shows how the following markup would be

In order to create applications of this category, you might have to define a DTD for your information. Then you have to write classes to import and export information from your XML document(s) (validating using your application's DTD if you have one). You must also write the classes which create the user interface in your application. The user of your application can view and modify information using the GUI (graphical user interface), and they can save (and load) their information to (and from) an XML file (that might use your DTD); in other words, they can save (and load) their information to (and from) an ApplicationML file (where Application is the name of your application). Some examples are AddressBookML, MathML, SVGML, etc.

The classes that import and export information from your ApplicationML file must use the parser and SAX or DOM API in order to import the information. These classes can access this information by using one of the following strategies:

  1. Use DOM to directly manipulate the information stored in the document (which DOM turns into a tree of nodes). This document object is created by the DOM XML parser after it reads in the XML document. This option leads to messy and hard-to-understand code. Also, this works better for document-type data rather than just computer generated data (like data structures and objects used in your code).
  2. Create your own Java object model that imports information from the XML document by using either SAX or DOM. This kind of object model only uses SAX or DOM to initialize itself with the information contained in the XML document(s). Once the parsing and initialization of your object model is completed, DOM or SAX isn't used anymore. You can use your own object model to accessed or modify your information without using SAX or DOM anymore. So you manipulate your information using your own objects, and rely on the SAX or DOM APIs to import the information from your ApplicationML file into memory (as a bunch of Java objects). You can think of this object model as an in-memory instance of the information that came was "serialized" in your XML document(s). Changes made to this object model are made persistent automatically, you have to deal with persistence issues (ie, write code to save your object model to a persistence layer as XML).