문제

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