views:

39

answers:

1

Hi,

I have a div box (absolutely positioned), which is expandable and below that I have another div box non-expandabe (relatively positioned).

Now when that absolutely expandable div expands, the one below that dosen't shifts down.

Is this not possible ? Had my code been not too long, I would have placed it here... Can anyone help me on this..

+1  A: 

When you absolutely position something it removes it from the flow the document, so it just overlaps stuff and doesn't push anything out of the way. Perhaps the first div doesn't need to be absolutely positioned?

mikeocool
actually I have a set of 3 (small) absolutely positioned (expandable) div in a row inside a relatively positioned (expandable) div. Now if I make the 3 boxes relatively positioned, then when all 3 are in collapsed state then layout is ok but when I expand, say 1st, one small box, the box adjacent to shifts down in collapsed state, as now its position which was relatively positioned changes when the 1st box expands. And similarly the 3rd shifts down when 2nd one also expands. Though I have been able to handle this layout through some patch js coding, but I wished to do it using css only.
Rahul Utb