구

퀵 메뉴를 하나 만들었는데 이게 중앙 정렬이 되질 않네요..

· 2010-02-07 (일) 00:15:54 · 1750 · 9

---------- tail.php의 내용입니다.



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>

    </td>
   </tr>
   <tr><td height="16" style="border-right:1px solid #DDDDDD;"> </td></tr>
  </table>

  <div style="border:1px solid #ddd; height:34px; background:url(<?=$g4[path]?>/img/title_bg.gif) repeat-x;">
  <table width='100%' cellpadding="0" cellspacing="0" border="0" align="center">
   <tr>
    <td height="10"><td>
   </tr>
   <tr>
    <td valign="top" align="center"><font color="#848484">Copyright ⓒ DKT Server Season2 - All rights reserved.</font></td>
   </tr>
   <tr>
    <td height="10"><td>
   </tr>
  </table>
  </div>
  <div style="height:3px; background:url(<?=$g4[path]?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>

  </td>
 </tr>
 <tr>
  <td height="10"><td>
 </tr>
</table>

<?
include_once("$g4[path]/tail.sub.php");
?>


<div id="divMenu" style="position:absolute; margin:0 auto; right:0; bottom:0;">
    <img src="http://******/images/quick.jpg" border="0" usemap="#quick">
</div>

 
<script language=javascript>
<!--
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) {
                yMenuFrom   = document["divMenu"].top;
                yMenuTo     = top.pageYOffset + 0;
        }
        else if ( bExplorer4plus ) {
                yMenuFrom   = parseInt (divMenu.style.top, 0);
                yMenuTo     = document.body.scrollTop + 151;
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }

        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divMenu"].top += yOffset;
                else if ( bExplorer4plus )
                        divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
        var y;
        if ( top.frames.length )
        if ( bNetscape4plus ) {
                document["divMenu"].top = top.pageYOffset + 35;
                document["divMenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                divMenu.style.top = document.body.scrollTop + 10;
                divMenu.style.visibility = "visible";
        }
        CheckUIElements();
        return true;
}
OnLoad();
//-->

new (document.getElementById("divMenu"),915,303,15,10);

</script>


 
<map name="quick" id="quick">
<area shape="rect" coords="26,40,69,55" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="26,64,70,80" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="22,90,75,107" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="26,117,69,132" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="32,142,65,158" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="22,167,76,185" href="http://******" onfocus="blur();"/>
<area shape="rect" coords="26,194,69,210" href="http://*****" onfocus="blur();"/>
<area shape="rect" coords="26,229,69,249" href="http://******" onfocus="blur();"/></map>

이렇게 지정을 했는데 퀵 메뉴가 중앙에 오질 않고 브라우저의 한 20% 정도 위쯤에 오드라구요..

홈페이지만드는게 너무 재미있어서 이러저러 해볼려고 하는데 이쪽으로 제가 문외한이라 6시간 넘게 계속 여기만지고 저기 만지고 했는데 도저히 감이 오질 않아서요...

아 참 그리고 이상태에서 적용 시키면 웹페이지 오류 떴다고 뜨던데.....

사례라도 해드려야 되는데 형편이 여유치가 않아 포인트밖이 못걸어서 정말 죄송합니다..ㅠㅠ

편안한 주말 보내시길 바랍니다..

|

댓글 9개

2010-02-07 (일) 00:47:28
이거 그냥 간단해요 top 이라는 글자 들가고 뒤에 숫자 있으면 숫자만 바꺼가면서 수정하면 금방 찾아요.

참고로 퀵바위치가 처음에 시작하는 위치와 그후에 이동할 위치가 있어요.

좋은 답변 못드려서 죄송해요 ㅠㅠ
지금 이건 퀵바가 왔다리 갔다리 이동하는 상태인데두 퀵바가 처음 위치랑 나중 위치가 있나요?
2010-02-07 (일) 02:57:37
처음 웹을 띄웠을때 퀵바가 첫 시작하는 위치가있어요.

그리고 지정된 위치로 움직인 후에.

그후에 지정한 속도로 스크롤바를 따라 와따리가따리 하며 이동하는거죠.
글쿤요... 그나저나 인터넷 찾아서 계속 바꿔봐도 이거 원;;;;;

중앙이 되면 스크롤에 따라 욺직이질 않고...
2010-02-07 (일) 04:41:21
쪽지주세요 제가 쓰는 쏘스 드릴께요
자료 정말 감사드립니다.

제가 지금 여기 써놓은 소스와 상태는 똑같지만 더욱 보기 쉽고 설명도 잘 적어주셨네요 정말 감사드립니다 ^^
2010-02-07 (일) 06:06:46
ㅎㅎ 멀요..그런데 혹시 액션스크립트랑 자바스크립트 두개 잘하세요?

4시간째 막히고있어용
결론은 사이트에 맞게 조절하다보니 대충 나왔네용;;

완전 php에 문외한 입니다... 무한 구글링으로 답을 찾고있어요..
2010-02-07 (일) 17:48:28
그런식으로 계속 찾고 오래 쳐다보면 저절로 되더라구여 ㅎㅎㅎ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
10-02-07 조회 2,844
10-02-07 조회 1,623
10-02-07 조회 1,235
10-02-07 조회 1,595
10-02-07 조회 1,584
10-02-07 조회 2,029
10-02-07 조회 1,751
10-02-06 조회 1,596
10-02-06 조회 1,490
10-02-06 조회 3,023
10-02-06 조회 1,543
10-02-06 조회 1,597
10-02-06 조회 1,585
10-02-06 조회 1,253
10-02-06 조회 1,139
10-02-06 조회 1,730
10-02-06 조회 1,878
10-02-06 조회 1,056
10-02-06 조회 1,598
10-02-06 조회 1,531