I have 4 <div> tags one after the other, all in position:absolute and I align them using top and left.
The 3rd div tag contains dynamic content and the height of the div changes according to the amount of text in it. However, as I set the top and left of all divs, the 4th div is affected by the height of the 3rd dynamic div.
How can I solve this?
You may want to try wrapping the 4 divs in a parent div and absolutely positioning that. Then you can allow the position of one of the children divs to affect another.
http://jsfiddle.net/25Xrh/5/
The solution you had meant that no matter what you tried to affect the
top:60pxandleft:180pxstopped it from moving anywhere other than this, so the dynamic content div wasn’t able to reposition it.