> which means that if a contained element has: width: 100%, and the containing element had: width: 200px;, it will assign to the contained element a width: of 200 px and not as much as space available, right?
Yes, you're right about it not being the space available to it, but to clarify a point, tables follow a completely different set of rules. They only follow explicit widths when it is convienient to do so. If you provide a table with a width of 100% and the containing element has a width of 200 pixels, the table will have a width of 200 pixels, unless the content in the cells of that table add up to more than 200 pixels, in which case it will overflow the boundaries of the containing element (e.g. add up to greater than 200 pixels). In that light widths on table elements are more like minimum widths, they stretch if the content is larger than those widths allow. That is until you apply the table-layout: fixed; declaration to the table, in which case any defined widths are explicitly and strictly adheared to.
Second question, I haven't yet evaluated this example, I suspect my error is only in the explanation and not in the example itself. This example was designed to mirror pixel for pixel the XML based version of the same recipe that is presented in Chapter 17, so I don't think the margin should be moved.
Regards,
Rich
--
[
http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design