How can I determine (using jQuery?) The height of the div? Its height is not defined in CSS, so it is fluid and based on content.
I tried $ ('# div'). height () - which returns 0.
Ideas?
EDIT: (code)
$(document).ready(function () {
PositionBottomPicture();
});
function PositionBottomPicture() {
var parentOffset = $('#left_pane').offset();
var parentsHeight = $('#left_pane').height();
var childsTopPostion = (parentOffset.top + parentsHeight);
$('#bottom_pic').offset({ top: childsTopPostion, left: parentOffset.left });
}
CSS:
{
float: left;
margin-left: 27px;
position: relative;
}
where 'left_pane' and 'bottom_pic' are div.
Thank!
source
share