DTD 사용없이 SideView 위치

· 2014-06-16 (월) 11:53:12 · 4285 · 1
급하게 처리 했습니다.

<!doctype html>
<html lang="ko">
<head>

또는

<html>
<head>

상단에 이렇게 해놓고 작업하시는 경우
사이트뷰 위치가 않되서 급하게 처리했습니다

/js/sideview.js 파일안에서

function showLayer()
{

if (oSideViewLayer == null) {
oSideViewLayer = document.createElement("DIV");
oSideViewLayer.id = this.targetObj;
// oSideViewLayer.style.position = 'absolute'; <--- 주석처리
oBody.appendChild(oSideViewLayer);
}

var vleft = getAbsoluteLeft(this.curObj)-this.curObj.offsetWidth+3;
oSideViewLayer.style.cssText = "top:"+getAbsoluteTop(this.curObj)+"px;left:"+vleft+"px;position: absolute;";

/*
if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight;
else
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight;
oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14;
*/
............................
............................
}

이렇게 처리 .....

크로스 브라우징으로
Chrome, IE 는 8 이상에서 확인 하였습니다.
|

댓글 1개

2014-06-21 (토) 13:39:43
찾던건데 다행이네요..
감사합니다 ^^
댓글을 작성하시려면 로그인이 필요합니다.

그누4 팁자료실

3,309건

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
15-02-26 조회 7,320
14-12-27 조회 7,702
14-09-24 조회 5,452
14-08-15 조회 5,486
14-08-11 조회 5,618
14-07-27 조회 7,499
14-07-16 조회 7,699
14-07-10 조회 7,043
14-07-09 조회 6,017
14-07-09 조회 7,882
14-07-07 조회 7,204
14-07-03 조회 6,014
14-06-23 조회 1.1만
14-06-16 조회 4,286
14-06-14 조회 7,908
14-06-07 조회 5,495
14-05-31 조회 1.4만
14-05-31 조회 5,267
14-05-23 조회 7,285
14-05-19 조회 6,215