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: Floats: No more to the right than the right edge of the containing block</title>
5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/047-demo.html" type="text/html">
8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats">
9 <style type="text/css">
10 .outer { width: 15em; background: red; border-left: 1em solid orange; }
11 .container { width: 9em; margin-left: 4em; background: orange;
12 height: 1em; line-height: 1;
13 border: 1em transparent; border-style: none solid; }
14 .float { float: right; width: 14em; background: blue; color: blue; }
15 .control { width: 14em; height: 1em; background: blue;
16 border-left: 1em solid orange; border-right: 1em solid orange; }
17 </style>
18 </head>
19 <body>
20 <p>Test passes if there is a single blue rectangle below with a vertical
21 orange stripe on each side.</p>
22 <div class="control"></div>
23 <div class="outer" dir="ltr">
24 <div class="container">
25 <div class="float">TEST-LTR</div>
26 </div>
27 </div>
28 <div class="outer" dir="rtl">
29 <div class="container">
30 <div class="float">TEST-RTL</div>
31 </div>
32 </div>
33 </body>
34 </html>