Saturday 15 September 2012

html - How do hide div if ad does not appear -


I have just implemented AdSense on my website. I have added a box-shadow in that divide that includes my ads to add depth level. When no ads are being done, or the ad is blocked through adblock or some things, then the deal is empty and the box - The shadow is just there and it looks stupid. If an ad is not shown or blocked, how can I hide that div? Here my code is far removed:

  & lt; Div id = "footer" & gt; & Lt; Script type = "text / javascript" & gt; & Lt ;! - Ad Content // - & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://pagead2.googlesyndication.com/pagead/show_ads.js" & gt; & Lt; / Script & gt;   

  #footer {status: relative; Bottom: 0; Width: 728px; Height: 90px; Text align: center; Box-shadow: 0 px 0 px 10 px black; Margin-left: auto; Margin-right: auto; }    

You might see the contents of that div (id: 'footer') After those scripts, one-third tag goes with your script in the script, you can check to see if the div contains more content, and if you can not remove the shadow. You probably want to load the ad from the page and block it along and compare it to what it looks like in the case of what it looks empty and it shows how it looks like.

No comments:

Post a Comment