You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>In CSS 2.1, many box positions and sizes are calculated with respect
87
-
to <span class="delcurrent">the edges
88
-
of a rectangular box called a</span><span class="insproposed">their</span> <span class="index-def"
87
+
to the edges
88
+
of a rectangular box called a <span class="index-def"
89
89
title="containing block"><dfn>containing block</dfn></span>. In
90
90
general, generated boxes act as containing blocks for descendant
91
91
boxes; we say that a box "establishes" the containing block for its
@@ -516,7 +516,7 @@ with the <span class="propinst-top">'top'</span>,
516
516
<span class="propinst-bottom">'bottom'</span>, and
517
517
<span class="propinst-left">'left'</span>
518
518
properties.
519
-
These properties specify offsets with respect to the <span class="delcurrent">box's</span> <span class="insproposed"><em>padding</em> box of its</span>
519
+
These properties specify offsets with respect to the box's
positioned boxes are taken out of the normal flow. This means
522
522
they have no impact on the layout of later siblings. Also,
@@ -573,38 +573,50 @@ positioned boxes, laid out according to four properties:</p>
573
573
574
574
<p>This property specifies how far an <a
575
575
href="#absolutely-positioned">absolutely positioned</a> box's top
576
-
margin edge is offset below the top <span class="insproposed"><em>padding</em></span> edge of <span class="delcurrent">the box's</span><span class="insproposed">its</span> <a
576
+
margin edge is offset below the top edge of the box's <a
577
577
href="#containing-block">containing block</a>. For relatively
578
578
positioned boxes, the offset is with respect to the top edges of the
579
579
box itself (i.e., the box is given a position in the normal flow, then
580
580
offset from that position according to these properties).
581
+
<span class="note">
582
+
Note: For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the <em>padding</em> edge of that element.
583
+
</span>
581
584
</p>
582
585
583
586
<!-- #include src=properties/right.srb -->
584
587
585
588
<p>Like 'top', but specifies how far a box's right margin edge is
586
-
offset to the left of the right <span class="insproposed"><em>padding</em></span> edge of <span class="delcurrent">the box's</span><span class="insproposed">its</span> <a
589
+
offset to the left of the right edge of the box's <a
587
590
href="#containing-block">containing block</a>. For relatively
588
591
positioned boxes, the offset is with respect to the right edge of the
589
592
box itself.
593
+
<span class="note">
594
+
Note: For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the <em>padding</em> edge of that element.
595
+
</span>
590
596
</p>
591
597
592
598
<!-- #include src=properties/bottom.srb -->
593
599
594
600
<p>Like 'top', but specifies how far a box's bottom margin edge is
595
-
offset above the bottom <span class="insproposed"><em>padding</em> edge</span> of <span class="delcurrent">the box's</span><span class="insproposed">its</span> <a
601
+
offset above the bottom of the box's <a
596
602
href="#containing-block">containing block</a>. For relatively
597
603
positioned boxes, the offset is with respect to the bottom edge of the
598
604
box itself.
605
+
<span class="note">
606
+
Note: For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the <em>padding</em> edge of that element.
607
+
</span>
599
608
</p>
600
609
601
610
<!-- #include src=properties/left.srb -->
602
611
603
612
<p>Like 'top', but specifies how far a box's left margin edge is
604
-
offset to the right of the left <span class="insproposed"><em>padding</em></span> edge of <span class="delcurrent">the box's</span><span class="insproposed">its</span> <a
613
+
offset to the right of the left edge of the box's <a
605
614
href="#containing-block">containing block</a>. For relatively
606
615
positioned boxes, the offset is with respect to the left edge of the
607
616
box itself.
617
+
<span class="note">
618
+
Note: For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the <em>padding</em> edge of that element.
619
+
</span>
608
620
</p>
609
621
610
622
<p>The values for the four properties have the following meanings:</p>
<dd>The offset is a percentage of the containing block's <span class="insproposed"><em>padding</em> box</span> width (for <span class="propinst-left">'left'</span> or <span
619
-
class="propinst-right">'right'</span>) or <span class="insproposed"><em>padding</em> box</span> height (for <span
630
+
<dd>The offset is a percentage of the containing block's box width (for <span class="propinst-left">'left'</span> or <span
631
+
class="propinst-right">'right'</span>) or height (for <span
620
632
class="propinst-top">'top'</span> and <span
621
633
class="propinst-bottom">'bottom'</span>). For 'top'
622
634
and 'bottom', if the height of the
@@ -933,7 +945,7 @@ In other words, if inline boxes are placed
933
945
on the line before a left float is encountered that fits in the remaining line box space,
934
946
the left float is placed on that line, aligned with the top of the line box, and then the inline boxes already on the line are moved accordingly to the right of the float (the right being the other side of the left float) and vice versa for rtl and right floats.
935
947
</p>
936
-
</p>
948
+
<p>
937
949
The margin box of an element in the normal flow that establishes a new block formatting context (such as a table, or element with 'overflow' other than 'visible') must not overlap any floats in the same block formatting context as the element itself. If necessary, implementations should clear the said element by placing it below any preceding floats, but may place it adjacent to such floats if there is sufficient space.
938
950
</p>
939
951
<div class="example">
@@ -1194,7 +1206,7 @@ the <span class="propinst-clear">'clear'</span> property</h3>
1194
1206
<em>not</em> be adjacent to an earlier floating box. (It may be that
1195
1207
the element itself has floating descendants; the <span
1196
1208
class="propinst-clear">'clear'</span> property has no effect on
1197
-
those<span class="insproposed">, neither does it affect elements in a different formatting context</span>.)
1209
+
those<span class="insproposed">, neither does it affect elements in a different block formatting context</span>.)
class="propinst-left">'left'</span> properties and the <span class="delcurrent">box's</span> <span class="insproposed"><em>padding</em> box of the</span>
1421
+
class="propinst-left">'left'</span> properties and the box's
1410
1422
containing block.
1411
1423
</p>
1412
1424
</li>
@@ -1627,13 +1639,12 @@ Consider the following CSS declarations for <em>outer</em> and
1627
1639
</pre>
1628
1640
1629
1641
<p>which cause the top of the <em>outer</em> box to be positioned with
1630
-
respect to <span class="insproposed">the
1631
-
<em>padding</em> box of</span> its containing block. The containing block for a positioned
1642
+
respect to its containing block. The containing block for a positioned
1632
1643
box is established by the nearest positioned ancestor (or, if none
1633
1644
exists, the <a href="visudet.html#containing-block-details">initial containing
1634
1645
block</a>, as in our example). The top side of the <em>outer</em> box
1635
-
is '200px' below the top <span class="insproposed">padding edge</span> of the containing block and the left side is
1636
-
'200px' from the left <span class="delcurrent">side</span><span class="insproposed">padding edge of the containing block</span> . The child box of <em>outer</em> is flowed
1646
+
is '200px' below the top of the containing block and the left side is
1647
+
'200px' from the left side. The child box of <em>outer</em> is flowed
0 commit comments