abspos-inline-002

Absolutely positioned boxes in inlines: 'auto' with 'relative'

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3  <head>
 4   <title>CSS Test: Absolutely positioned boxes in inlines: 'auto' with 'relative'</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/002.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos">
 8   <style type="text/css">
 9    p { font: 1em monospace; }
10    .filler { color: silver; }
11    .absolute { color: white; background: green; position: absolute; }
12    .fail { color: yellow; background: red; }
13    .test { position: relative; }
14   </style>
15  </head>
16  <body>
17   <p>
18    <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
19    <span class="test"> The test has <span class="absolute">PASSED</span><span class="fail">FAILED</span>.</span>
20    <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
21   </p>
22   <p>(Exception: when the word FAILED has is at the beginning of a
23   line, the word PASSED may still be at the end of the previous
24   line.)</p>
25  </body>
26 </html>