Forum Moderators: martinibuster
<style>
#block_3 {
position: sticky !important;
top: 0
}
.med_rect {
width: 300px;
max-height: 250px;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #E3E3E3;
background: #F5F7F9;
}
<div id="block_2" class="med_rect"
style="margin: 10px 0 20px 0; height: auto">
<script>
// tableWidth is set earlier, and shouldn't be relevant to this
if (tableWidth >= 975)
googletag.cmd.push(function() { googletag.display('block_2'); });
</script>
<div id="backup_2"></div>
</div>
<div id="block_3" class="med_rect"
style="height: auto; max-height: none !important; margin-bottom: 20px">
<script>
if (tableWidth >= 975)
googletag.cmd.push(function() { googletag.display('block_3'); });
</script>
<div id="backup_3"></div>
</div> <div id="block_3" class="med_rect"
style="height: auto; max-height: none !important; margin-bottom: 20px">
<script>
if (tableWidth >= 975)
googletag.cmd.push(function() { googletag.display('block_3'); });
</script>
<div id="something_from_google">
<iframe id="something_else_from_google"></iframe>
</div>
<div id="backup_3"></div>
</div> var gFrame;
if (i = document.getElementById('block_3')) {
for (m in i.childNodes)
if (gFrame = i.childNodes[m].id)
break;
if (gFrame &&
(
document.getElementById(gFrame).clientHeight < 50||
document.getElementById(gFrame).innerHTML == ''
)
)
) {
// do stuff
}