[팁] dtd strict 선언일경우 firefox 관리자 하위 메뉴 정보
[팁] dtd strict 선언일경우 firefox 관리자 하위 메뉴
본문
head.sub.php 에
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
선언을 햇을경우
관리자 메뉴의 하위 메뉴가 모두 환경설정 밑으로 보이는 현상이 있습니다.
이는 strict 의 까다로운 조건때문인데
이를 제대로 돌아가게 할려면
/adm/admin.head.php 파일의
function layer_view(link_id, menu_id, opt, x, y)
{
....
- menu.style.left = get_left_pos(link) + x;
- menu.style.top = get_top_pos(link) + link.offsetHeight + y;
+ menu.style.left = get_left_pos(link) + x +"px";
+ menu.style.top = get_top_pos(link) + link.offsetHeight + y + "px";
...
}
처럼 마지막에 px 를 추가 해주면 firefox 에서도 하위 메뉴가 제대로 나오게 됩니다..
추천
2
2
댓글 2개

사이드뷰에도 같은 현상이 있습니다.
sideview.js
if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight + "px";
else
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + "px";
oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14 + "px";
와 같이 뒤에 +"px" 를 추가 해주시면 정상적으로 나오게 됩니다.
sideview.js
if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight + "px";
else
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + "px";
oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14 + "px";
와 같이 뒤에 +"px" 를 추가 해주시면 정상적으로 나오게 됩니다.
감사합니다.. 많은 도움 되었습니다^^