Skip to content

Commit e7a3dd7

Browse files
committed
[css2]
- Some reordering into top, right, bottom, left order - Removed statement from box padding about containing block - s/height/box height in second-to-last para before 8.2 - Last para before 8.2: Border properties do not determing background of borders. - Added to 8.3 and 8.5 These properties apply to all elements, but vertical margins will not have any effect on non-replaced inline elements. Conforming HTML user agents may ignore the margin properties on the HTML element. - To 8.3.1 added this note: Adjoining boxes may be generated by elements that are not related as siblings or ancestors. - To 8.5.3: The color of borders drawn for values of 'groove', 'ridge', 'inset', and 'outset' depends on the element's border color properties. (s/color/border color) --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401759
1 parent 57f1051 commit e7a3dd7

1 file changed

Lines changed: 30 additions & 33 deletions

File tree

css2/box.src

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: box.src,v 1.18 1998-06-08 14:39:04 ijacobs Exp $ -->
3+
<!-- $Id: box.src,v 1.19 1999-11-02 17:39:30 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Box model</TITLE>
@@ -36,9 +36,9 @@ to pieces of margin, border, and padding:</P>
3636
alt="Image illustrating the relationship between content, padding, borders, and margins."></P>
3737
</div>
3838

39-
<P>The margin, border, and padding can be broken down into left,
40-
right, top, and bottom segments (e.g., in the diagram, "LM" for left
41-
margin, "RP" for right padding, "TB" for top border, etc.).
39+
<P>The margin, border, and padding can be broken down into top, right,
40+
bottom, and left segments (e.g., in the diagram, "LM" for left margin,
41+
"RP" for right padding, "TB" for top border, etc.).
4242

4343
<P>The perimeter of each of the four areas (content, padding, border,
4444
and margin) is called an "edge", so each box has four edges:</P>
@@ -51,8 +51,6 @@ or <span class="index-def" title="inner edge"><a name="inner-edge"><strong>inner
5151
<dt><span class="index-def" title="padding edge"><a name="padding-edge"><strong>padding edge</strong></a></span>
5252
<dd>The padding edge surrounds the box padding. If the padding
5353
has 0 width, the padding edge is the same as the content edge.
54-
The padding edge of a box defines the edges of the
55-
<a href="visuren.html#containing-block">containing block</a> established by the box.
5654
<dt><span class="index-def" title="border edge"><a name="border-edge"><strong>border edge</strong></a></span>
5755
<dd>The border edge surrounds the box's border. If the border
5856
has 0 width, the border edge is the same as the padding edge.
@@ -63,8 +61,8 @@ edge</strong></a></span>
6361
has 0 width, the margin edge is the same as the border edge.
6462
</dl>
6563

66-
<P>Each edge may be broken down into a left, right, top, and bottom
67-
edge.
64+
<P>Each edge may be broken down into a top, right, bottom, and left
65+
edge.
6866

6967
<P>The dimensions of the content area of a box -- the <span
7068
class="index-def" title="box::content width"><a
@@ -83,24 +81,14 @@ model details</a>.
8381
name="the-box-width"><dfn>box width</dfn></a></span> is given by the
8482
sum of the left and right margins, border, and padding, and the
8583
content width. The <span class="index-def" title="box::height"><a
86-
name="the-box-height"><dfn>height</dfn></a></span> is given by the sum
84+
name="the-box-height"><dfn>box height</dfn></a></span> is given by the sum
8785
of the top and bottom margins, border, and padding, and the content
8886
height.
8987

90-
<P>The background style of the various areas of a box are determined
91-
as follows:</p>
92-
93-
<ul>
94-
<li><em>Content area</em>: The <span
95-
class="propinst-background">'background'</span> property of
96-
the generating element.
97-
<li><em>Padding area</em>: The <span
98-
class="propinst-background">'background'</span> property of
99-
the generating element.
100-
<li><em>Border area</em>: The <a href="#border-properties">
101-
border properties</a> of the generating element.
102-
<li><em>Margin area</em>: Margins are always transparent.
103-
</ul>
88+
<P>The background style of the content, padding, and border areas of a
89+
box is specified by the <span
90+
class="propinst-background">'background'</span> property of the
91+
generating element. Margin backgrounds are always transparent.
10492

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

@@ -192,10 +180,13 @@ content areas shines through them.
192180
<span class="propinst-margin">'margin'</span></H2>
193181

194182
<P>Margin properties specify the width of the <a
195-
href="#box-margin-area">margin area</a> of a box. The
196-
<span class="propinst-margin">'margin'</span> shorthand property sets
197-
the margin for all four sides while the other margin properties only
198-
set their respective side.
183+
href="#box-margin-area">margin area</a> of a box. The <span
184+
class="propinst-margin">'margin'</span> shorthand property sets the
185+
margin for all four sides while the other margin properties only set
186+
their respective side. These properties apply to all elements, but
187+
vertical margins will not have any effect on non-replaced inline
188+
elements. <a href="conform.html#conformance">Conforming HTML user
189+
agents</a> may ignore the margin properties on the HTML element.
199190

200191
<P>The properties defined in this section refer to the <span
201192
class="index-def" title="&lt;margin-width&gt;::definition of"><a
@@ -224,6 +215,7 @@ margins</a> for behavior.
224215
implementation-specific limits.
225216

226217
<!-- #include src=properties/margin-top.srb -->
218+
<!-- #include src=properties/margin-right.srb -->
227219

228220
<P>These properties set the top, right, bottom, and left margin of a
229221
box.
@@ -296,6 +288,8 @@ In the case of negative margins, the absolute maximum of the negative
296288
adjoining margins is deducted from the maximum of the positive
297289
adjoining margins. If there are no positive margins, the absolute
298290
maximum of the negative adjoining margins is deducted from zero.
291+
<strong>Note.</strong> Adjoining boxes may be generated by
292+
elements that are not related as siblings or ancestors.
299293

300294
<li>Vertical margins between a <a
301295
href="visuren.html#floats">floated</a> box and any other box do not
@@ -304,6 +298,7 @@ collapse.
304298
<li>Margins of <a
305299
href="visuren.html#absolutely-positioned">absolutely</a> and
306300
relatively positioned boxes do not collapse.
301+
307302
</ul>
308303

309304
<P>Please
@@ -399,8 +394,10 @@ font in use.
399394
<H2><a name="border-properties">Border properties</a></H2>
400395

401396
<P>The border properties specify the width, color, and style of the <a
402-
href="#box-border-area">border area</a> of a box. These
403-
properties apply to all elements.
397+
href="#box-border-area">border area</a> of a box. These properties
398+
apply to all elements. <a href="conform.html#conformance">Conforming
399+
HTML user agents</a> may ignore the border properties on the HTML
400+
element.
404401

405402

406403
<div class="note"><P>
@@ -571,18 +568,18 @@ into the canvas.
571568
<dd>The opposite of 'grove': the border
572569
looks as though it were coming out of the canvas.
573570
<dt><strong><span class="index-def" title="'inset'"><a name="value-def-inset" class="value-def">inset</a></span></strong>
574-
<dd>The border makes the entire box look as though
571+
<dd>The border makes the box look as though
575572
it were embedded in the canvas.
576573
<dt><strong><span class="index-def" title="'outset'"><a name="value-def-outset" class="value-def">outset</a></span></strong>
577574
<dd>The opposite of 'inset': the
578-
border makes the entire box look as though
575+
border makes the box look as though
579576
it were coming out of the canvas.
580577
</dl>
581578

582579
<P>All borders are drawn on top of the box's background. The color of
583580
borders drawn for values of 'groove', 'ridge', 'inset', and 'outset'
584-
depends on the element's <span class="propinst-color">'color'</span>
585-
property.
581+
depends on the element's <a href="#border-color-properties">border
582+
color properties</a>.
586583

587584
<P><span class="index-inst" title="conformance"><a
588585
href="conform.html#conformance">Conforming HTML user agents</a></span> may

0 commit comments

Comments
 (0)