text-indent-rtl-002

Text-indent with negative value

WeasyPrint

This browser

Flags
ahem
Assertion
The 'text-indent' property with negative values with direction rtl indent to the right.

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 with negative value</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#indentation-prop">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="The 'text-indent' property with negative values with direction rtl indent to the right.">
 9         <style type="text/css">
10             #div1
11             {
12                 direction: rtl;
13                 width: 40em;
14             }
15             #div2
16             {
17                 font-family: Ahem;
18                 line-height: 1em;
19                 text-indent: -5em;
20                 width: 30em;
21             }
22             #div3
23             {
24                 background: blue;
25                 height: 1em;
26                 float: right;
27                 margin-right: -5em;
28                 width: 5em;
29             }
30         </style>
31     </head>
32     <body>
33         <p>Test passes if the black box below is directly above the blue box.</p>
34         <div id="div1">
35             <div id="div2">XXXXX</div>
36             <div id="div3"></div>
37         </div>
38     </body>
39 </html>