Skip to content

Commit d6488e1

Browse files
committed
[css2] Fixes suggested by Robert Stevahn, plus defined absolutely positioned element to mean position: absolute or fixed; removed note explaining rationale behind term fixed; removed term coordinates; added links
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401676
1 parent 74c42b4 commit d6488e1

File tree

1 file changed

+58
-55
lines changed

1 file changed

+58
-55
lines changed

css2/visuren.src

+58-55
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: 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 $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Visual formatting model</TITLE>
@@ -96,7 +96,7 @@ block height will grow to accommodate the document's content.
9696

9797
<P>The initial containing block cannot be positioned or floated (i.e.,
9898
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
100100
class="propinst-float">'float'</span> properties for the root
101101
element).
102102

@@ -116,7 +116,7 @@ specifies a box's type.
116116

117117
<P><span class="index-def" title="block-level
118118
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
120120
blocks (e.g., paragraphs). Several values of the <span
121121
class="propinst-display">'display'</span> property make an element
122122
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
130130
boxes</dfn></a></span>. The principal block box establishes the <a
131131
href="#containing-block">containing block</a> for descendant boxes and
132132
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
134134
href="#block-formatting">block formatting context</a>.
135135

136136
<P>Some block-level elements generate additional boxes outside of the
@@ -145,7 +145,7 @@ placed with respect to the principal box.
145145
<pre>
146146
&lt;DIV>
147147
Some text
148-
&lt;P>Some more text
148+
&lt;P>More text
149149
&lt;/DIV>
150150
</pre>
151151

@@ -158,7 +158,7 @@ around "Some text".
158158
<div class="figure">
159159
<p><img src="images/anon-block.gif" alt="diagram showing the three
160160
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.
162162
</div>
163163

164164
<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>
263263

264264
<ul>
265265
<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>)
267267
follows the compact box, the compact box is
268268
formatted like a one-line inline box.
269269
The resulting box width is compared to one of the side margins of
@@ -351,7 +351,7 @@ box</dfn></span> behaves as follows:</p>
351351
<ul>
352352
<li>If a <a href="#block-box">block</a>
353353
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
355355
box, the run-in box becomes the first inline box of the block box.
356356
<li>Otherwise, the run-in box becomes a block box.
357357
</ul>
@@ -511,7 +511,7 @@ class="propinst-display">'display'</span> property.
511511

512512
<P>In CSS2, a box may be laid out according to three <span
513513
class="index-def" title="positioning scheme"><dfn>positioning
514-
schemes</dfn></span></p>
514+
schemes:</dfn></span></p>
515515

516516
<ol>
517517
<li><a href="#normal-flow">Normal flow</a>. In CSS2, normal
@@ -547,7 +547,7 @@ class="propinst-position">'position'</span> property</h3>
547547
<P>The <span class="propinst-position">'position'</span> and <span
548548
class="propinst-float">'float'</span> properties determine which
549549
of the CSS2 positioning algorithms is used to calculate
550-
the coordinates of a box.
550+
the position of a box.
551551

552552
<!-- #include src=properties/position.srb -->
553553

@@ -560,25 +560,18 @@ the coordinates of a box.
560560
href="#normal-flow">normal flow</a>. The <span
561561
class="propinst-left">'left'</span> and <span
562562
class="propinst-top">'top'</span> properties do not apply.
563-
<strong>Note.</strong> The word
564-
"static" may seem confusing&#8212;'fixed' is arguably more static than
565-
'static'&#8212;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>.
571563

572564
<dt><strong>relative</strong>
573565

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
576569
href="#relative-positioning">relative</a> to its normal position. When
577570
a box B is relatively positioned, the position of the following box is
578571
calculated as though B were not offset.
579572

580573
<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
582575
with the <span class="propinst-left">'left'</span>,
583576
<span class="propinst-right">'right'</span>,
584577
<span class="propinst-top">'top'</span>,
@@ -587,12 +580,13 @@ These properties specify offsets with respect to the box's
587580
<a href="#containing-block">containing block</A>. Absolutely
588581
positioned boxes are taken out of the normal flow. This means
589582
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
591585
do not <a href="box.html#collapsing-margins">collapse</a>
592586
with any other margins.
593587

594588
<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'
596590
model, but in addition, the box is <a
597591
href="#fixed-positioning">fixed</a> with respect to some reference. In
598592
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
677671
well. See the sections on the
678672
<a href="visudet.html#abs-non-replaced-width">width</a>
679673
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.
681676
</dl>
682677

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).
689684

690685
<H2><a name="normal-flow">Normal flow</a></H2>
691686

@@ -742,7 +737,7 @@ line box, they are distributed among two or more vertically-stacked
742737
line boxes. Thus, a paragraph is a vertical stack of line boxes. Line
743738
boxes are stacked with no vertical separation and they never overlap.
744739

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
746741
of its containing block and the right edge touches the right edge of
747742
its containing block. However, floating boxes may come between the
748743
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>
920915
property.
921916

922917
<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.
934929

935930
<P>Since a float is not in the flow, non-positioned block boxes
936931
created before and after the float box flow vertically as if the float
@@ -1065,7 +1060,9 @@ class="propinst-clear">'clear'</span> property).
10651060

10661061
<P>This property specifies whether a box should float to the left,
10671062
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
10691066
the following meanings:</p>
10701067

10711068
<dl>
@@ -1195,15 +1192,21 @@ right'), or both ('clear: both').
11951192

11961193
<H2><a name="absolute-positioning">Absolute positioning</a></H2>
11971194

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'.
12071210

12081211
<H3><a name="fixed-positioning">Fixed positioning</a></H3>
12091212

@@ -1299,7 +1302,7 @@ user agents must <a href="syndata.html#ignore">ignore</a>
12991302
<span class="propinst-float">'float'</span>. In this
13001303
case, the element generates no box.
13011304

1302-
<li>Otherwise, if <span class="propinst-position">'position'</span>
1305+
<li>Otherwise, <span class="propinst-position">'position'</span>
13031306
has the value 'absolute' or 'fixed', <span
13041307
class="propinst-display">'display'</span> is set to 'block' and <span
13051308
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
15701573
box with respect to a containing block."></p>
15711574
</div>
15721575

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>
15741577

15751578
<PRE class="example">
15761579
#outer { color: red }
@@ -1590,7 +1593,7 @@ box would end up in this case.</P>
15901593

15911594
<div class="figure">
15921595
<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>
15941597
</div>
15951598

15961599
<div class="html-example"><P>

0 commit comments

Comments
 (0)