javascript - Adding Adsense to html -
i can't seem add adsense html have in div on right side of page (yellow box) nothing shown , have been patient, been waiting days now. anyway here code.
html
<div id="ad2"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-1234567890123456"; /* oas ad */ google_ad_slot = "4238564948"; google_ad_width = 100%; google_ad_height = 100%; //--> </script> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div>
and css use organise place
#ad2 { background-color:#ff0; position:absolute; top:44%; right:1%; height:50%; width:10%; z-index:1;}
the following lines incorrect:
google_ad_width = 100%; google_ad_height = 100%;
these values must set actual numbers of pixels, not percentages. (as written, causing syntax error because %
being interpreted modulo operator, missing right hand argument.)
Comments
Post a Comment