Skip to content

Commit 65ac245

Browse files
committed
[css2] Added text about where padding and margins go around inline elements broken over several lines
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402119
1 parent 283ef8e commit 65ac245

1 file changed

Lines changed: 25 additions & 14 deletions

File tree

css2/box.src

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
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+
24
<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 $ -->
46
<HEAD>
57
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
68
<TITLE>Box model</TITLE>
79
</HEAD>
810
<BODY>
9-
<H1 align="center"><a name="box-model">Box model</a></H1>
11+
<H1><a name="box-model">Box model</a></H1>
1012

1113
<P>The CSS box model describes the rectangular boxes that are
1214
generated for elements in the <a href="conform.html#doctree">document
@@ -90,10 +92,10 @@ generating element. Margin backgrounds are always transparent.
9092

9193
<H2><a name="mpb-examples">Example of margins, padding, and borders</a></H2>
9294

93-
This example illustrates how margins, padding, and borders
95+
<P>This example illustrates how margins, padding, and borders
9496
interact. The example HTML document:
9597

96-
<PRE class="html-example">
98+
<pre class="html-example">
9799
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;
98100
&lt;HTML&gt;
99101
&lt;HEAD&gt;
@@ -128,7 +130,7 @@ interact. The example HTML document:
128130
&lt;/UL&gt;
129131
&lt;/BODY&gt;
130132
&lt;/HTML&gt;
131-
</PRE>
133+
</pre>
132134

133135
<P>results in a <a href="conform.html#doctree">document tree</a> with
134136
(among other relationships) a UL element that has two LI
@@ -745,24 +747,33 @@ relevant.
745747
</div>
746748

747749

748-
<h3>The border model for inline elements</h3>
750+
<h2>The border model for inline elements</h2>
749751

750752
<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).
754755

755756
<p>When the element's <span
756757
class=propinst-direction>'direction'</span> property is 'ltr', the
757758
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.
760762

761763
<p>When the element's <span
762764
class=propinst-direction>'direction'</span> property is 'rtl', the
763765
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.
766769

767770
</BODY>
768771
</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

Comments
 (0)