The following is the CSS style declarations for this red-bordered
div
{
background-color: white;
border: 1px solid red;
color: black;
left: 300px;
padding: 8px;
position: absolute;
top: 100px;
width: 50%;
}
Actual results in MSIE 6 SV1: the percentage of width value is
relative to the available width of the body, is relative to the
immediate parent node's available width. On a 1024x768 scr. res. with a
maximized MSIE 6 browser window, the computed width of this
red-bordered div is 418px.
Expected results: the percentage of width value should be relative
to the offsetParent's available width, not relative to the immediate
parent node. The offsetParent (element acting as the positioning
context) of that red-bordered div could (should?) be what the specs
refer to as the "Initial Containing Block" which should be in MSIE 6
the HTML node. On a 1024x768 scr. with a maximized MSIE 6 browser
window, the computed width of this red-bordered div should be approx.
502px.
References:
"A positioned element should be positioned to the nearest containing
positioned element, not the containing element."
Opera on absolute
positioning
"The containing block for a positioned box is established by the
nearest positioned ancestor (or, if none exists, the initial containing
block)" CSS 2.1 9
Visual formatting model section 9.8.4 Absolute positioning