text-indent-104

Text-indent set to '+50%'

WeasyPrint

This browser

Flags
ahem
Assertion
Ensure that text-indent +50% adds 50% of its containing block's width in front of the text.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Text-indent set to '+50%'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#propdef-text-indent">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#indentation-prop">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="Ensure that text-indent +50% adds 50% of its containing block's width in front of the text.">
10         <style type="text/css">
11             #parent
12             {
13                 font: 16px/1em Ahem;
14                 position: relative;
15                 width: 400px;
16             }
17             #reference
18             {
19                 color: red;
20                 left: 0;
21                 position: absolute;
22                 top: 0;
23                 z-index: -1;
24             }
25             #test
26             {
27                 text-indent: +50%;
28                 margin-left: -50%;
29             }
30         </style>
31     </head>
32     <body>
33         <p>Test passes if there is no red visible on the page.</p>
34         <div id="parent">
35             <div id="reference">X</div>
36             <div id="test">X</div>
37         </div>
38     </body>
39 </html>