Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/CSS2/box-display/block-in-inline-margin-with-leading-text.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Test: text before block-in-inline sits on its own line above the block</title>
<link rel="match" href="block-in-inline-margin-with-leading-text-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<meta name="assert" content="Inline text before a block-in-inline forms its own line that ends before the block begins.">
<style>
.container { width: 100px; font: 20px/1 Ahem; color: green; }
.inner { width: 100px; height: 20px; margin-bottom: 40px; background: green; }
.sibling { width: 100px; height: 20px; background: green; }
</style>
<p>'XX' on a line, green square below, 40px gap, then a green square.</p>
<div class="container">
<span>XX<div class="inner"></div></span>
</div>
<div class="sibling"></div>