Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css2.1 / 20110323 / absolute-non-replaced-width-008.htm
blob8d0427a595ba7c90ac5e488c1a084cc68d94fd20
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: Absolutely positioned non-replaced elements with left, width, right and margin-right not auto</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">
7 <meta name="flags" content="ahem">
8 <script src="../../resources/ahem.js"></script>
9 <meta name="assert" content="If 'left', 'width', 'right' and 'margin-right' are all not 'auto' and 'margin-left' is 'auto', then solve the equation for 'margin-left'.">
10 <style type="text/css">
11 #containingblock
13 border: solid black;
14 direction: ltr;
15 height: 2in;
16 position: relative;
17 width: 3in;
19 div div
21 /* left + margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right + right = width of containing block */
22 /* 1in + solve + 0 + 0 + 1in + 0 + 0 + 1in + 1in = 3in */
23 background: red;
24 color: blue;
25 font: 1in/1em Ahem;
26 left: 1in;
27 margin-left: auto; /* value is solved to -1 */
28 margin-right: 1in;
29 position: absolute;
30 right: 1in;
31 width: 1in;
33 </style>
34 </head>
35 <body>
36 <p>Test passes if the blue square is in the upper-left corner of the black rectangle and there is no red visible on the page.</p>
37 <div id="containingblock">
38 <div>X</div>
39 </div>
40 </body>
41 </html>