Repositiong absolute elements with javascript
May I ask for your opinions on whether or not it would be considered 'bad practise' to reposition a div using javascript based on the height of another absolutely-positioned div which I want it to be behind (z-indexed)?

The main content div is positioned absolutely, and has variable height on each page depending on the 'dynamically generated' content. I positioned it absolutely and not relatively because then I ended up with a gap at the bottom of my page where the content div still takes up its original space on the page.

Behind and underneath that content div, with a slight overlap, I want another div. Since the content div is absolutely positioned and of variable height, I can't relatively or absolutely position my bottom div. So I'm planning to use javascript/jquery to get the height of my content div and position the bottom/behind div relative to it on the page (using absolute positioning).

Is that bad practise, or is that the right thing to do?

Thank you!
Repositiong absolute elements with javascript
===

May I ask for your opinions on whether or not it would be considered 'bad practise' to reposition a div using javascript based on the height of another absolutely-positioned div which I want it to be behind (z-indexed)?

The main content div is positioned absolutely, and has variable height on each page depending on the 'dynamically generated' content. I positioned it absolutely and not relatively because then I ended up with a gap at the bottom of my page where the content div still takes up its original space on the page.

Behind and underneath that content div, with a slight overlap, I want another div. Since the content div is absolutely positioned and of variable height, I can't relatively or absolutely position my bottom div. So I'm planning to use javascript/jquery to get the height of my content div and position the bottom/behind div relative to it on the page (using absolute positioning).

Is that bad practise, or is that the right thing to do?

Thank you!