In order to make this work, JavaScript is required.
document.documentElement.clientHeight
provides the client's height.
If the height is insufficient, you may need to scroll down:
window.scrollTo(0, 500);
To address this issue:
if(document.documentElement.clientHeight < 500) {
window.scrollTo(0, 500);
}
The proper height depends on your banner size and Iframe location.
Another option is to move your banner below the Iframe using CSS only if the window height is inadequate.
Media Queries can be utilized for this purpose:
div div {
width:100px;
height:100px;
}
div[blue] {
background-color:blue;
}
div[green] {
background-color:green;
}
div[parent] {
display:flex;
flex-direction: column-reverse;
}
@media only screen and (min-width: 600px) {
div[parent] {
flex-direction: column;
}
}
<div parent>
<div green>
green
</div>
<div blue>
blue
</div>
</div>