I have this code:

<div class="c1">                                    
  //code that makes a div move downwards                     
</div>  
<div class="banner">        
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

  <ins class="adsbygoogle" style="display:inline-block;width:200px;height:200px;" ....>
  </ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>        
</div>  

in div class c1 there is a div that scrolls down when clicking on a button. If instead of the google ads code there is

<div class="banner">        
<img src="...">       
</div>

The div is over the top of the image as it should be. But with google ads, the ad is not covered.

How to place the div above google ads?

有帮助吗?

解决方案

just make these changes it should work

<div class="c1" style="position:absolute;z-index:2147483647">                                    
  //code that makes a div move downwards                     
</div> 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top