Domanda

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?

È stato utile?

Soluzione

just make these changes it should work

<div class="c1" style="position:absolute;z-index:2147483647">                                    
  //code that makes a div move downwards                     
</div> 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top