Need help? Check out our Support site, then

div tag positioning is not working properly

  1. Hi There,

    We are trying to make google ad drop in at a particualr place on a post, so we used DIV tag. But the problem is, positioning does not seem to be working properly. Regardless of top:XXXpx value, it always shows up at the header of the page.

    We used below code.

    // Below script is under head tag

    <script language="JavaScript1.2">

    var ie=document.all
    var dom=document.getElementById
    var ns4=document.layers
    var calunits=document.layers? "" : "px"

    var bouncelimit=32 //(must be divisible by 8)
    var direction="up"

    function initbox(){
    if (!dom&&!ie&&!ns4)
    crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    crossobj.visibility=(dom||ie)? "visible" : "show"

    function dropin(){
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    if (parseInt(<100+scroll_top)

    function bouncein(){
    if (bouncelimit<0)
    if (bouncelimit==0){

    function dismissbox(){
    if (window.bouncestart) clearInterval(bouncestart)

    function truebody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body



    //below code is in body

    <div id="dropin" style="position:absolute;visibility:hidden;left:200px;top:500px;width:500px;height:300px;background-color:#F5F5F5">

    <div align="right">[Close Box] </div>

    Here text or ad or image or...


    Please help. Also advise if this kind of dropin code is allowed for google ads?
    We tested in testing environment and cannot give you a live link for you to see how it behaves in real.

    I will be happy to provide more information as needed.


  2. I found a solution with div in a div tag. thanks anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic