親の幅を固定して、すべての親コンテンツのオーバーレイとして div 子要素を作成したいと思います。(例としては、通常フォト ギャラリーで表示される js のキャプションが考えられます)
HTML:
<div class="parent">
<div class="child">child</div>
<div class="overlay">overlay them</div>
</div>
CSS:
.parent{
width:300px;
max-width:300px;
}
.child{
width:100%;
min-width:100%;
position:relative;
}
.overlay{
position: /*?? to make it cover like overlay all the .child so all the .parent content*/
}
jsfiddle: http://jsfiddle.net/ttUgM/1/