|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <title>Long description for example illustrating positioning with respect to a positioned ancestor</title> |
| 5 | + </head> |
| 6 | + <body> |
| 7 | + <h1>Long description for example illustrating positioning with respect to a positioned ancestor</h1> |
| 8 | + <p> |
| 9 | + This diagram illustrates the effects of absolutely positioning a box ("inner") with |
| 10 | + respect to a containing block established by a relatively positioned ancestor ("outer"). |
| 11 | + </p> |
| 12 | + <p> |
| 13 | + A document window is shown, with 8 lines (numbered 1 to 8), each 24px high. All body and |
| 14 | + "outer" text has been flowed into lines into lines 1, 2, and 3. The "inner" box has been |
| 15 | + positioned relative to the top and left edges of the "outer" element's first inline box. |
| 16 | + </p> |
| 17 | + <p> |
| 18 | + In the following PRE element, each 24 pixel line is simulated by two lines, the second |
| 19 | + beginning with the appropriate number. The reference edges for positioning the "inner" |
| 20 | + box are indicated in the diagram by thick dashed lines. The upper left coordinates of |
| 21 | + the "inner" box are labeled by (+200, -100). In the PRE element below, the reference |
| 22 | + edges for "inner" are indicated by vertical bars and equal signs. The offset of the |
| 23 | + "inner" box is given in square brackets. The lines of text, as they appear in the image, |
| 24 | + contain approximately: |
| 25 | + </p> |
| 26 | + <pre> ==== |
| 27 | + | |
| 28 | +1 Beginning of body contents.|Start |
| 29 | + |
| 30 | +2 of outer contents. End of outer |
| 31 | + |
| 32 | +3 contents. End of body contents. |
| 33 | + |
| 34 | +4 [(+200, -100)] |
| 35 | + |
| 36 | +5 Inner |
| 37 | + |
| 38 | +6 contents. |
| 39 | + |
| 40 | +7 |
| 41 | + |
| 42 | +8 |
| 43 | +</pre> |
| 44 | + <p> |
| 45 | + The default text color is black. "Start of outer contents" is red. "Inner contents" is |
| 46 | + blue. "End of outer contents" is red. |
| 47 | + </p> |
| 48 | + <p><a href="../Overflow.html#img-flow-abs-rel">Return to image.</a></p> |
| 49 | + </body> |
| 50 | +</html> |
0 commit comments