1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
2
<html lang="en">
3
- <!-- $Id: visuren.src,v 2.67 1998-05-06 19:33:28 ijacobs Exp $ -->
3
+ <!-- $Id: visuren.src,v 2.68 1998-05-08 16:31:51 ijacobs Exp $ -->
4
4
<HEAD>
5
5
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6
6
<TITLE>Visual formatting model</TITLE>
@@ -96,7 +96,7 @@ block height will grow to accommodate the document's content.
96
96
97
97
<P>The initial containing block cannot be positioned or floated (i.e.,
98
98
user agents <a href="syndata.html#ignore">ignore</a> the <span
99
- class="propinst-position">'position'</span> <span
99
+ class="propinst-position">'position'</span> and <span
100
100
class="propinst-float">'float'</span> properties for the root
101
101
element).
102
102
@@ -116,7 +116,7 @@ specifies a box's type.
116
116
117
117
<P><span class="index-def" title="block-level
118
118
element"><a name="block-level"><dfn>Block-level elements</dfn></a></span> are those elements of
119
- the source document language that are formatted visually as
119
+ the source document that are formatted visually as
120
120
blocks (e.g., paragraphs). Several values of the <span
121
121
class="propinst-display">'display'</span> property make an element
122
122
block-level: 'block', 'list-item', 'compact' and 'run-in' (part of the
@@ -130,7 +130,7 @@ title="block box"><a name="block-box"><dfn>block
130
130
boxes</dfn></a></span>. The principal block box establishes the <a
131
131
href="#containing-block">containing block</a> for descendant boxes and
132
132
generated content and is also the box involved in any positioning
133
- scheme. Sibling principal block boxes participate in a <a
133
+ scheme. Principal block boxes participate in a <a
134
134
href="#block-formatting">block formatting context</a>.
135
135
136
136
<P>Some block-level elements generate additional boxes outside of the
@@ -145,7 +145,7 @@ placed with respect to the principal box.
145
145
<pre>
146
146
<DIV>
147
147
Some text
148
- <P>Some more text
148
+ <P>More text
149
149
</DIV>
150
150
</pre>
151
151
@@ -158,7 +158,7 @@ around "Some text".
158
158
<div class="figure">
159
159
<p><img src="images/anon-block.gif" alt="diagram showing the three
160
160
boxes for the example above"> <p class="caption">Diagram showing the
161
- three boxes, of which one is anonymous, for the example above
161
+ three boxes, of which one is anonymous, for the example above.
162
162
</div>
163
163
164
164
<p>In other words: if a block box (such as that generated for
@@ -263,7 +263,7 @@ box</dfn></a></span> behaves as follows:</p>
263
263
264
264
<ul>
265
265
<li>If a <a href="#block-box">block</a> box (that does not
266
- float and is not absolutely positioned)
266
+ float and is not <a href="# absolutely-positioned">absolutely positioned</a> )
267
267
follows the compact box, the compact box is
268
268
formatted like a one-line inline box.
269
269
The resulting box width is compared to one of the side margins of
@@ -351,7 +351,7 @@ box</dfn></span> behaves as follows:</p>
351
351
<ul>
352
352
<li>If a <a href="#block-box">block</a>
353
353
box (that does not float and is not
354
- absolutely positioned) follows the run-in
354
+ <a href="# absolutely-positioned">absolutely positioned</a> ) follows the run-in
355
355
box, the run-in box becomes the first inline box of the block box.
356
356
<li>Otherwise, the run-in box becomes a block box.
357
357
</ul>
@@ -511,7 +511,7 @@ class="propinst-display">'display'</span> property.
511
511
512
512
<P>In CSS2, a box may be laid out according to three <span
513
513
class="index-def" title="positioning scheme"><dfn>positioning
514
- schemes</dfn></span></p>
514
+ schemes: </dfn></span></p>
515
515
516
516
<ol>
517
517
<li><a href="#normal-flow">Normal flow</a>. In CSS2, normal
@@ -547,7 +547,7 @@ class="propinst-position">'position'</span> property</h3>
547
547
<P>The <span class="propinst-position">'position'</span> and <span
548
548
class="propinst-float">'float'</span> properties determine which
549
549
of the CSS2 positioning algorithms is used to calculate
550
- the coordinates of a box.
550
+ the position of a box.
551
551
552
552
<!-- #include src=properties/position.srb -->
553
553
@@ -560,25 +560,18 @@ the coordinates of a box.
560
560
href="#normal-flow">normal flow</a>. The <span
561
561
class="propinst-left">'left'</span> and <span
562
562
class="propinst-top">'top'</span> properties do not apply.
563
- <strong>Note.</strong> The word
564
- "static" may seem confusing—'fixed' is arguably more static than
565
- 'static'—but 'static' was chosen because the expectation is that it
566
- will most often be used in scripts that "animate" elements by
567
- modifying <span class="propinst-top">'top'</span>, <span
568
- class="propinst-left">'left'</span>, <span
569
- class="propinst-bottom">'bottom'</span>, and/or <span
570
- class="propinst-right">'right'</span>.
571
563
572
564
<dt><strong>relative</strong>
573
565
574
- <dd>The box coordinates are calculated according to the <a
575
- href="#normal-flow">normal flow</a>, then the box is offset <a
566
+ <dd>The box's position is calculated according to the <a
567
+ href="#normal-flow">normal flow</a> (this is called the position in
568
+ normal flow). Then the box is offset <a
576
569
href="#relative-positioning">relative</a> to its normal position. When
577
570
a box B is relatively positioned, the position of the following box is
578
571
calculated as though B were not offset.
579
572
580
573
<dt><strong>absolute</strong>
581
- <dd> The box coordinates (and possibly size) are specified
574
+ <dd> The box's position (and possibly size) is specified
582
575
with the <span class="propinst-left">'left'</span>,
583
576
<span class="propinst-right">'right'</span>,
584
577
<span class="propinst-top">'top'</span>,
@@ -587,12 +580,13 @@ These properties specify offsets with respect to the box's
587
580
<a href="#containing-block">containing block</A>. Absolutely
588
581
positioned boxes are taken out of the normal flow. This means
589
582
they have no impact on the layout of later siblings. Also,
590
- though absolutely positioned boxes have margins, they
583
+ though <a href="#absolutely-positioned">absolutely positioned</a>
584
+ boxes have margins, they
591
585
do not <a href="box.html#collapsing-margins">collapse</a>
592
586
with any other margins.
593
587
594
588
<dt><strong>fixed</strong>
595
- <dd> The box coordinates are calculated according to the 'absolute'
589
+ <dd> The box's position is calculated according to the 'absolute'
596
590
model, but in addition, the box is <a
597
591
href="#fixed-positioning">fixed</a> with respect to some reference. In
598
592
the case of <a href="media.html#continuous-media-group">continuous
@@ -677,15 +671,16 @@ depends on which of related properties have the value 'auto' as
677
671
well. See the sections on the
678
672
<a href="visudet.html#abs-non-replaced-width">width</a>
679
673
and <a href="visudet.html#abs-non-replaced-height">height</a>
680
- of absolutely positioned, non-replaced elements for details.
674
+ of <a href="#absolutely-positioned">absolutely positioned</a>,
675
+ non-replaced elements for details.
681
676
</dl>
682
677
683
- <P>For absolutely positioned boxes, the offsets are with respect to
684
- the box's <a href="#containing-block">containing block</a>. For
685
- relatively positioned boxes, the offsets are with respect to the outer
686
- edges of the box itself (i.e., the box is given a position in the
687
- normal flow, then offset from that position according to these
688
- properties).
678
+ <P>For <a href="#absolutely- positioned">absolutely positioned</a>
679
+ boxes, the offsets are with respect to the box's <a
680
+ href="#containing-block">containing block</a>. For relatively
681
+ positioned boxes, the offsets are with respect to the outer edges of
682
+ the box itself (i.e., the box is given a position in the normal flow,
683
+ then offset from that position according to these properties).
689
684
690
685
<H2><a name="normal-flow">Normal flow</a></H2>
691
686
@@ -742,7 +737,7 @@ line box, they are distributed among two or more vertically-stacked
742
737
line boxes. Thus, a paragraph is a vertical stack of line boxes. Line
743
738
boxes are stacked with no vertical separation and they never overlap.
744
739
745
- <P>In general, the left edge of a line box touches the left left edge
740
+ <P>In general, the left edge of a line box touches the left edge
746
741
of its containing block and the right edge touches the right edge of
747
742
its containing block. However, floating boxes may come between the
748
743
containing block edge and the line box edge. Thus, although line
@@ -920,17 +915,17 @@ the description of the <span class="propinst-float">'float'</span>
920
915
property.
921
916
922
917
<P>A floated box must have an explicit width (assigned via the <span
923
- class="propinst-width">'width'</span> property, or its
924
- <a href="conform.html#intrinsic">intrinsic</a> width
925
- in the case of replaced elements). Any floated box becomes a <a
926
- href="#block-box">block box</a> that is shifted to the left or right
927
- until its outer edge touches the containing block edge or the outer
928
- edge of another float. The top of the floated box is aligned with the
929
- top of the current line box (or bottom of the preceding block box if
930
- no line box exists). If there isn't enough horizontal room on the
931
- current line for the float, it is shifted downward, line by line,
932
- until a line has room for it or it touches the containing block
933
- edge.
918
+ class="propinst-width">'width'</span> property, or its <a
919
+ href="conform.html#intrinsic">intrinsic</a> width in the case of <a
920
+ href="conform.html# replaced-element">replaced elements</a> ). Any
921
+ floated box becomes a <a href="#block-box">block box</a> that is
922
+ shifted to the left or right until its outer edge touches the
923
+ containing block edge or the outer edge of another float. The top of
924
+ the floated box is aligned with the top of the current line box (or
925
+ bottom of the preceding block box if no line box exists). If there
926
+ isn't enough horizontal room on the current line for the float, it is
927
+ shifted downward, line by line, until a line has room for it or it
928
+ touches the containing block edge.
934
929
935
930
<P>Since a float is not in the flow, non-positioned block boxes
936
931
created before and after the float box flow vertically as if the float
@@ -1065,7 +1060,9 @@ class="propinst-clear">'clear'</span> property).
1065
1060
1066
1061
<P>This property specifies whether a box should float to the left,
1067
1062
right, or not at all. It may be set for elements that generate boxes
1068
- that are not absolutely positioned. The values of this property have
1063
+ that are not
1064
+ <a href="#absolutely-positioned">absolutely positioned</a>.
1065
+ The values of this property have
1069
1066
the following meanings:</p>
1070
1067
1071
1068
<dl>
@@ -1195,15 +1192,21 @@ right'), or both ('clear: both').
1195
1192
1196
1193
<H2><a name="absolute-positioning">Absolute positioning</a></H2>
1197
1194
1198
- <P>In the absolute positioning model, a box is assigned explicit
1199
- coordinates with respect to its containing block. It is removed from
1200
- the normal flow entirely (it has no impact on later siblings). An
1201
- absolutely positioned box establishes a new containing block for
1202
- normal flow children and positioned descendants.
1203
- However, the contents of an absolutely positioned element do not flow
1204
- around any other boxes. They may or may not obscure the contents of
1205
- another box, depending on the <a href="#stack-level">stack levels</a>
1206
- of the overlapping boxes.
1195
+ <P>In the absolute positioning model, a box is explicitly offset with
1196
+ respect to its containing block. It is removed from the normal flow
1197
+ entirely (it has no impact on later siblings). An absolutely
1198
+ positioned box establishes a new containing block for normal flow
1199
+ children and positioned descendants. However, the contents of an
1200
+ absolutely positioned element do not flow around any other boxes. They
1201
+ may or may not obscure the contents of another box, depending on the
1202
+ <a href="#stack-level">stack levels</a> of the overlapping boxes.
1203
+
1204
+ <P>References in this specification to an <span class="index-def"
1205
+ title="absolutely positioned element">
1206
+ <a name="absolutely-positioned"><dfn>absolutely positioned
1207
+ element</dfn></a></span> (or its box) imply that the element's <span
1208
+ class="propinst-position">'position'</span> property has the value
1209
+ 'absolute' or 'fixed'.
1207
1210
1208
1211
<H3><a name="fixed-positioning">Fixed positioning</a></H3>
1209
1212
@@ -1299,7 +1302,7 @@ user agents must <a href="syndata.html#ignore">ignore</a>
1299
1302
<span class="propinst-float">'float'</span>. In this
1300
1303
case, the element generates no box.
1301
1304
1302
- <li>Otherwise, if <span class="propinst-position">'position'</span>
1305
+ <li>Otherwise, <span class="propinst-position">'position'</span>
1303
1306
has the value 'absolute' or 'fixed', <span
1304
1307
class="propinst-display">'display'</span> is set to 'block' and <span
1305
1308
class="propinst-float">'float'</span> is set to 'none'. The position
@@ -1570,7 +1573,7 @@ serve as references for <span class="propinst-top">'top'</span> and
1570
1573
box with respect to a containing block."></p>
1571
1574
</div>
1572
1575
1573
- <P>If we do not positioned the <em>outer</em> box:</P>
1576
+ <P>If we do not position the <em>outer</em> box:</P>
1574
1577
1575
1578
<PRE class="example">
1576
1579
#outer { color: red }
@@ -1590,7 +1593,7 @@ box would end up in this case.</P>
1590
1593
1591
1594
<div class="figure">
1592
1595
<P><img src="./images/flow-static.gif"
1593
- alt="Image illustrating the effects of absolutely positioning a box with respect to a coordinate system established by a normally positioned parent."></p>
1596
+ alt="Image illustrating the effects of absolutely positioning a box with respect to a containing block established by a normally positioned parent."></p>
1594
1597
</div>
1595
1598
1596
1599
<div class="html-example"><P>
0 commit comments