테스트 사이트 - 개발 중인 베타 버전입니다

문의드립니다.

· 14년 전 · 1114
떠다니는 배너소스인데..자꾸...해상도에따라 위치가 변경되네요..ㅠ.ㅠ
방법이 없을까요??
 
<div id="floatdiv" style="background-color:#ffffff; padding:0px; border-width:0px; border-color:#ffffff; border-style:solid; width:36px; height:120px; position:absolute; left:0px; top:0px; z-index:0;">  
<!-- 왼쪽플로팅2TOP버튼 -->
<div class="post_share retweet"  id="post_retweet2">
<a href=http://happypension.tistory.com onfocus='this.blur()'
><img src=http://cfs.tistory.com/custom/blog/67/679845/skin/images/home1.GIF></a>
</div>
<!-- 왼쪽플로팅2TOP버튼끝 -->
<!-- 왼쪽플로팅3HOME버튼 -->
<div class="post_share retweet"  id="post_retweet3">
<a href=# onfocus='this.blur()'>
<img src=http://cfs.tistory.com/custom/blog/67/679845/skin/images/home2.GIF></a>
</div>
<!-- 왼쪽플로팅3HOME버튼끝 -->
<!-- 왼쪽플로팅3TOP버튼 -->
<div class="post_share retweet"  id="post_retweet4">
<a href=http://db.blueweb.co.kr/formmail/formmail.html?dataname=jaulimks0 target=_blank onfocus='this.blur()'>
<img src=http://cfs.tistory.com/custom/blog/67/679845/skin/images/home3.GIF></a>
</div>
<!-- 왼쪽플로팅3TOP버튼끝 -->
<!-- 왼쪽플로팅3TOP버튼 -->
<div class="post_share retweet"  id="post_retweet4">
<a href=http://db.blueweb.co.kr/formmail/formmail.html?dataname=jaulimks0 target=_blank onfocus='this.blur()'>
<img src=http://cfs.tistory.com/custom/blog/67/679845/skin/images/home5.gif></a>
</div>
<!-- 왼쪽플로팅3TOP버튼끝 -->
</div>
<script type="text/javascript">
<!--
var floatingMenuId = 'floatdiv';
var floatingMenu =
{
    targetX: 10,     //       
    targetY: 325,         // 
    hasInner: typeof(window.innerWidth) == 'number',
    hasElement: document.documentElement
        && document.documentElement.clientWidth,
    menu:
        document.getElementById
        ? document.getElementById(floatingMenuId)
        : document.all
          ? document.all[floatingMenuId]
          : document.layers[floatingMenuId]
};
floatingMenu.move = function ()
{
    if (document.layers)
    {
        floatingMenu.menu.left = floatingMenu.nextX;
        floatingMenu.menu.top = floatingMenu.nextY;
    }
    else
    {
        floatingMenu.menu.style.left = floatingMenu.nextX + 'px';
        floatingMenu.menu.style.top = floatingMenu.nextY + 'px';
    }
}
floatingMenu.computeShifts = function ()
{
    var de = document.documentElement;
    floatingMenu.shiftX =
        floatingMenu.hasInner
        ? pageXOffset
        : floatingMenu.hasElement
          ? de.scrollLeft
          : document.body.scrollLeft;
    if (floatingMenu.targetX < 0)
    {
        if (floatingMenu.hasElement && floatingMenu.hasInner)
        {
            // Handle Opera 8 problems
            floatingMenu.shiftX +=
                de.clientWidth > window.innerWidth
                ? window.innerWidth
                : de.clientWidth
        }
        else
        {
            floatingMenu.shiftX +=
                floatingMenu.hasElement
                ? de.clientWidth
                : floatingMenu.hasInner
                  ? window.innerWidth
                  : document.body.clientWidth;
        }
    }
    floatingMenu.shiftY =
        floatingMenu.hasInner
        ? pageYOffset
        : floatingMenu.hasElement
          ? de.scrollTop
          : document.body.scrollTop;
    if (floatingMenu.targetY < 0)
    {
        if (floatingMenu.hasElement && floatingMenu.hasInner)
        {
            // Handle Opera 8 problems
            floatingMenu.shiftY +=
                de.clientHeight > window.innerHeight
                ? window.innerHeight
                : de.clientHeight
        }
        else
        {
            floatingMenu.shiftY +=
                floatingMenu.hasElement
                ? document.documentElement.clientHeight
                : floatingMenu.hasInner
                  ? window.innerHeight
                  : document.body.clientHeight;
        }
    }
}
floatingMenu.doFloat = function()
{
    var stepX, stepY;
    floatingMenu.computeShifts();
    stepX = (floatingMenu.shiftX +
        floatingMenu.targetX - floatingMenu.nextX) * .07;
    if (Math.abs(stepX) < .5)
    {
        stepX = floatingMenu.shiftX +
            floatingMenu.targetX - floatingMenu.nextX;
    }
    stepY = (floatingMenu.shiftY +
        floatingMenu.targetY - floatingMenu.nextY) * .07;
    if (Math.abs(stepY) < .5)
    {
        stepY = floatingMenu.shiftY +
            floatingMenu.targetY - floatingMenu.nextY;
    }
    if (Math.abs(stepX) > 0 ||
        Math.abs(stepY) > 0)
    {
        floatingMenu.nextX += stepX;
        floatingMenu.nextY += stepY;
        floatingMenu.move();
    }
    setTimeout('floatingMenu.doFloat()', 20);
};
// addEvent designed by Aaron Moore
floatingMenu.addEvent = function(element, listener, handler)
{
    if(typeof element[listener] != 'function' ||
       typeof element[listener + '_num'] == 'undefined')
    {
        element[listener + '_num'] = 0;
        if (typeof element[listener] == 'function')
        {
            element[listener + 0] = element[listener];
            element[listener + '_num']++;
        }
        element[listener] = function(e)
        {
            var r = true;
            e = (e) ? e : window.event;
            for(var i = element[listener + '_num'] -1; i >= 0; i--)
            {
                if(element[listener + i](e) == false)
                    r = false;
            }
            return r;
        }
    }
    //if handler is not already stored, assign it
    for(var i = 0; i < element[listener + '_num']; i++)
        if(element[listener + i] == handler)
            return;
    element[listener + element[listener + '_num']] = handler;
    element[listener + '_num']++;
};
floatingMenu.init = function()
{
    floatingMenu.initSecondary();
    floatingMenu.doFloat();
};
// Some browsers init scrollbars only after
// full document load.
floatingMenu.initSecondary = function()
{
    floatingMenu.computeShifts();
    floatingMenu.nextX = floatingMenu.shiftX +
        floatingMenu.targetX;
    floatingMenu.nextY = floatingMenu.shiftY +
        floatingMenu.targetY;
    floatingMenu.move();
}
if (document.layers)
    floatingMenu.addEvent(window, 'onload', floatingMenu.init);
else
{
    floatingMenu.init();
    floatingMenu.addEvent(window, 'onload',
        floatingMenu.initSecondary);
}
//-->
</script>
<!-- 떠있는 레이어 끝-->

 

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
1717635
1717629
1717626
1717625
1717621
1717619
1717611
1717610
1717609
1717607
1717601
1717598
1717591
1717590
1717583
1717575
1717572
1717568
1717566
1717549
1717545
1717533
1717512
1717511
1717508
1717495
1717479
1717473
1717470
1717463