#ycannot break out of its bounding box without being torn out of the document flow. Does it add to position: absolute;the #yeffect that you are after?
Update
HTML-, , . : http://jsfiddle.net/GfNbp
<div id="container">
<div id="box">
<div id="x"></div>
</div>
<div id="y"></div>
</div>
width: 100px;
height: 100px;
margin: 10px;
background: #ededed;
padding: 10px;
/* ADD THE OVERFLOW */
overflow-x: hidden;
overflow-y: visible;
}
position: absolute;
top: 30px;
left: 20px;
}
width: 150px;
height: 10px;
background: #c1ffb2;
}
width: 10px;
height: 150px;
background: #c4b2ff;
position: absolute;
left: 20px; /* margin+padding */
top: 30px; /* margin+padding+x-height */
}