|
1 | | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 1 | +<!doctype html public '-//W3C//DTD HTML 4.01//EN' |
| 2 | + 'http://www.w3.org/TR/html4/strict.dtd'> |
| 3 | + |
2 | 4 | <html lang="en"> |
3 | | -<!-- $Id: box.src,v 1.35 2003-07-01 15:42:14 bbos Exp $ --> |
| 5 | +<!-- $Id: box.src,v 1.36 2003-08-11 23:25:00 bbos Exp $ --> |
4 | 6 | <HEAD> |
5 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | 8 | <TITLE>Box model</TITLE> |
7 | 9 | </HEAD> |
8 | 10 | <BODY> |
9 | | -<H1 align="center"><a name="box-model">Box model</a></H1> |
| 11 | +<H1><a name="box-model">Box model</a></H1> |
10 | 12 |
|
11 | 13 | <P>The CSS box model describes the rectangular boxes that are |
12 | 14 | generated for elements in the <a href="conform.html#doctree">document |
@@ -90,10 +92,10 @@ generating element. Margin backgrounds are always transparent. |
90 | 92 |
|
91 | 93 | <H2><a name="mpb-examples">Example of margins, padding, and borders</a></H2> |
92 | 94 |
|
93 | | -This example illustrates how margins, padding, and borders |
| 95 | +<P>This example illustrates how margins, padding, and borders |
94 | 96 | interact. The example HTML document: |
95 | 97 |
|
96 | | -<PRE class="html-example"> |
| 98 | +<pre class="html-example"> |
97 | 99 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
98 | 100 | <HTML> |
99 | 101 | <HEAD> |
@@ -128,7 +130,7 @@ interact. The example HTML document: |
128 | 130 | </UL> |
129 | 131 | </BODY> |
130 | 132 | </HTML> |
131 | | -</PRE> |
| 133 | +</pre> |
132 | 134 |
|
133 | 135 | <P>results in a <a href="conform.html#doctree">document tree</a> with |
134 | 136 | (among other relationships) a UL element that has two LI |
@@ -745,24 +747,33 @@ relevant. |
745 | 747 | </div> |
746 | 748 |
|
747 | 749 |
|
748 | | -<h3>The border model for inline elements</h3> |
| 750 | +<h2>The border model for inline elements</h2> |
749 | 751 |
|
750 | 752 | <p>For each line box, UAs must take the inline boxes generated for |
751 | | -each element and render the borders and backgrounds in visual order |
752 | | -(not logical order). The results (what part of the background is |
753 | | -behind which element) may differ based on the line wrapping. |
| 753 | +each element and render the margins, borders and padding in visual |
| 754 | +order (not logical order). |
754 | 755 |
|
755 | 756 | <p>When the element's <span |
756 | 757 | class=propinst-direction>'direction'</span> property is 'ltr', the |
757 | 758 | left-most generated box of the first line box in which the element |
758 | | -appears has a left border, and the right-most generated box of the |
759 | | -last line box in which the element appears has a right border. |
| 759 | +appears has a left margin, left border and left padding, and the |
| 760 | +right-most generated box of the last line box in which the element |
| 761 | +appears has a right padding, right border and right margin. |
760 | 762 |
|
761 | 763 | <p>When the element's <span |
762 | 764 | class=propinst-direction>'direction'</span> property is 'rtl', the |
763 | 765 | right-most generated box of the first line box in which the element |
764 | | -appears has a right border, and the left-most generated box of the |
765 | | -last line box in which the element appears has a left border. |
| 766 | +appears has a right padding, right border and right margin, and the |
| 767 | +left-most generated box of the last line box in which the element |
| 768 | +appears has a left margin, left border and left padding. |
766 | 769 |
|
767 | 770 | </BODY> |
768 | 771 | </HTML> |
| 772 | +<!-- Keep this comment at the end of the file |
| 773 | +Local variables: |
| 774 | +mode: sgml |
| 775 | +sgml-declaration:"~/SGML/HTML4.dcl" |
| 776 | +sgml-default-doctype-name:"html" |
| 777 | +sgml-minimize-attributes:t |
| 778 | +End: |
| 779 | +--> |
0 commit comments