![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
style type="text/css" #OuterBox {position:absolute;top:10px;left:10px;width:400px; background-color:#eeeeff;} #ContentBox {position:absolute;top:10;left:10px;width:200px;ba ckground-color:#eeffee;} /style div id="OuterBox" div id="ContentBox" p>ContentBox<br />1<br />2<br />3<br />4<br />5 etc.</p /div /div ... "ContentBox" starts where I want it to, but *overlaps* OuterBox instead of filling it. |
#3
| |||
| |||
|
|
That's because your "ContentBox" is absolutely positioned and is taken out of the content flow of the "OuterBox". |
#4
| ||||
| ||||
|
|
I wasn't aware that "position:absolute" puts an element out of the content flow with regards to its *size*. |
|
Let's assume I want to give an element a fixed starting position relative to its parent element. It should keep that position - no matter what other elements follow/precede. In this case, I need "position:absolute", right? |
|
And this means that the parent and other child elements of the same parent will be positioned as if the absolutely positioned DIV weren't there at all? |
|
So there is no way to give an element a fixed, unchangeable starting position and still have other elements flow around it? |
![]() |
| Thread Tools | |
| Display Modes | |
| |