I thought his may be usefull for anyone wanting to use the whitespase fuctionality outside of its contraints.
jquery script:
if ($('#textBefore').height()+ $('#imageToHide').height() > $('#ContainingDiv').height()) {
$('#imageToHide').hide();
} else {
$('#imageToHide').show();
}