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
@@ -175,8 +175,8 @@ the relative positioning also affects the block box.
175
175
rules:</p>
176
176
177
177
<pre><code class="css">
178
-
body { display: inline }
179
-
p { display: block }
178
+
p { display: inline }
179
+
span { display: block }
180
180
</code></pre>
181
181
182
182
<p>were used with this HTML document:</p>
@@ -187,16 +187,18 @@ p { display: block }
187
187
<TITLE>Anonymous text interrupted by a block</TITLE>
188
188
</HEAD>
189
189
<BODY>
190
-
<em>This is anonymous text before the P.</em>
191
-
<P>This is the content of P.</P>
192
-
<em>This is anonymous text after the P.</em>
190
+
<P>
191
+
<em>This is anonymous text before the SPAN.</em>
192
+
<SPAN>This is the content of SPAN.</SPAN>
193
+
<em>This is anonymous text after the SPAN.</em>
194
+
</P>
193
195
</BODY>
194
196
</code></pre>
195
197
196
-
<p>The BODY element contains a chunk (C1) of anonymous text followed
198
+
<p>The P element contains a chunk (C1) of anonymous text followed
197
199
by a block-level element followed by another chunk (C2) of anonymous
198
-
text. The resulting boxes would be an anonymous block box around the BODY,
199
-
containing an anonymous block box around C1, the P block box, and
200
+
text. The resulting boxes would be an anonymous block box around the P,
201
+
containing an anonymous block box around C1, the SPAN block box, and
200
202
another anonymous block box around C2.
201
203
</p></div>
202
204
@@ -209,7 +211,7 @@ margins will be 0.
209
211
<p>
210
212
Properties set on elements that cause anonymous block boxes to be
211
213
generated still apply to the boxes and content of that element. For
212
-
example, if a border had been set on the BODY element in the above
214
+
example, if a border had been set on the P element in the above
213
215
example, the border would be drawn around C1 (open at the end of the
214
216
line) and C2 (open at the start of the line).
215
217
</p>
@@ -1294,46 +1296,49 @@ contexts.</a>
1294
1296
<a href="#run-in">run-in boxes</a>,
1295
1297
this property applies to the final block box to which the run-in box belongs.
1296
1298
</p>
1297
-
<p><dfn id="clearance">Clearance</dfn> is introduced as spacing above the margin-top of an element. It is used to push the element vertically (typically downward), past the float.
1298
-
</p>
1299
+
1299
1300
<p>Values have the following meanings when applied to non-floating
1300
1301
block boxes:</p>
1301
1302
1302
1303
<dl>
1303
1304
<dt><strong>left</strong></dt>
1304
1305
1305
-
<dd>The clearance of the generated box is set to the amount necessary to place the
1306
-
top border edge below the bottom outer edge of any left-floating
1307
-
boxes that resulted from elements earlier in the source document.
1306
+
<dd>Requires that the top border edge of the box be below the bottom
1307
+
outer edge of any left-floating boxes that resulted from elements
1308
+
earlier in the source document.
1308
1309
</dd>
1309
1310
1310
1311
<dt><strong>right</strong></dt>
1311
1312
1312
-
<dd>The clearance of the generated box is set to the amount necessary to place the
1313
-
top border edge below the bottom outer edge of any right-floating
1314
-
boxes that resulted from elements earlier in the source document.
1313
+
<dd>Requires that the top border edge of the box be below the bottom
1314
+
outer edge of any right-floating boxes that resulted from elements
1315
+
earlier in the source document.
1315
1316
</dd>
1316
1317
1317
1318
<dt><strong>both</strong></dt>
1318
1319
1319
-
<dd>The clearance of the generated box is set to the amount necessary to place the
1320
-
top border edge below the bottom outer edge of any right-floating
1321
-
and left-floating boxes that resulted from elements earlier in the
1322
-
source document.
1320
+
<dd>Requires that the top border edge of the box be below the bottom
1321
+
outer edge of any right-floating and left-floating boxes that resulted
1322
+
from elements earlier in the source document.
1323
1323
</dd>
1324
1324
1325
1325
<dt><strong>none</strong></dt>
1326
1326
1327
1327
<dd>No constraint on the box's position with respect to floats.</dd>
1328
1328
</dl>
1329
1329
1330
+
<p>Values other than 'none' potentially introduce <dfn
and acts as spacing above the margin-top of an element. It is used to
1333
+
push the element vertically past the float.
1334
+
1330
1335
<p>
1331
1336
Computing the clearance of an element on which 'clear' is set is done by first determining the hypothetical position of the element's top border edge within its parent block. This position is determined after the top margin of the element has been collapsed with previous adjacent margins (including the top margin of the parent block).
1332
1337
</p>
1333
1338
<p>
1334
1339
If this hypothetical position of the element's top border edge is not
1335
-
past the relevant floats, then its clearance must be set to the
1336
-
greater of:
1340
+
past the relevant floats, then clearance is introduced and must be set
1341
+
to the greater of:
1337
1342
</p>
1338
1343
<ol>
1339
1344
<li>The amount necessary to place the border edge of the block even
@@ -1356,7 +1361,7 @@ greater of:
1356
1361
</ul>
1357
1362
</ol>
1358
1363
<p class=note>
1359
-
Note: The clearance can be negative.
1364
+
Note: The clearance can be negative or zero.
1360
1365
1361
1366
<div class=example>
1362
1367
<p>An example of negative clearance is this situation, in which the
@@ -1378,10 +1383,10 @@ padding):
1378
1383
margins would collapse and the last paragraph's top border edge would
1379
1384
be flush with the top of the floating paragraph. But the 'clear'
1380
1385
requires the top border edge to be <em>below</em> the float, i.e., 2em
1381
-
lower. That means that the margins must not collapse and clearance
1382
-
must be added such that <var>clearance</var> + <var>margin-top</var> =
0 commit comments