Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 20th of October 2017 03:41:24 AM

Copyright © 2000 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, such a case, you get the result shown in Figure 7-72.

Figure 7-72

Figure 7-72. Floating an image wider than its parent element

Here, a left-floated image is wider than its parent, so its rightedge overruns the right edge of the parent element. Had the imagebeen floated to the right, then it would have overrun the left sideof the parent element instead.

Sebastopol, CA 95472.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a koala and the topic of HTML and XHTML is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.



Library Navigation Links

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

For example, if you have an address book document stored in an XML file, created on a Mac, that you would like to share with someone who has a PC, you can simply email them the plain text address book XML document. This cant be done with binary encoded information which is totally platform (and program) dependent.

Another example is web enabling legacy systems. It is very feasible to create a Java web ennoblement application server that simply uses the services provided by the underlying legacy system. Instead of rewriting the legacy system, if the system can be made to communicate results and parameters through XML, the new and old system can work together without throwing away a company's investment in the legacy system.

XML is an open standard

By making the W3C the keeper of the XML standard, it ensures that no one vendor should be able to cause interoperability problems to occur between systems that use the open standard. This should be reassuring to most companies making an investment in this technology, by being vendor neutral, this solution proposes to keep even small companies out of reach of big companies choosing to change the standards on them. For example, if a big company chooses to change the platform at its whim, then most other companies relying on that platform suffer. By keeping all data in XML and using XML in communications protocols, companies can maximize the lifetime of their investment in their products and solutions.

XML is language independent

block is the context in which formatting takesplace. For example, the containing block of a boldface element couldbe the paragraph in which it occurs, as demonstrated in Figure 9-1.

Figure 9-1

Figure 9-1. An example of a containing block

Not every element in CSS generates a containing block for itsdescendant elements. The rules for the establishment of a containingblock are as follows:

  1. Figure 9-4

    Figure 9-4. Filling the left half of the containing block

    Since the default value of both width and height is auto, the result shown in Figure 9-4 is exactly the same as if you had used these styles:

    top: 0; bottom: 0; left: 0; right: 50%; width: auto; height: auto;

    Now let's say you want to position an element that is in the upper-right corner of its containing block and is one-third as wide as its containing block, but only as tall as necessary to display its

    This sets all anchors with the class external(<A CLASS="external"HREF="...">) to be silver, instead of mediumgray. They'll still be a dark gray once they've beenvisited, of course, unless you add a special rule for that as well:

    BODY {color: black;}A:link {color: #808080;}      /* medium gray */A.external:link  {color: #666666;}A:active {color: silver;}