2012-04-24 2 views
0

페이지 중간에 나타나는 팝업 상자를 만들려고합니다. 바깥 쪽 상자는 우리가 사용하고있는 CMS에 의해 정의되며 오버 플로우 : 숨김과 너비 : 250px 스타일이 첨부되어 있습니다. 우리가 "바깥 상자에서 빠져 나오기"를 원하는 안쪽 상자는 우리가 통제 할 수 있고 우리가 원하는 모든 것을 할 수 있습니다.IE의 오버 플로우 : 숨겨진 상자 외부로 이동

불행히도 우리가 IE에서 시도하는 모든 것은 부모 상자의 오버 플로우 : 숨김의 그립에서 팝업을 "탈출"시키지 않습니다. 우리의 경우 부모 div 밖으로 팝업을 이동하는 것은 불가능합니다.

주 - 우리가 테스트 한 다른 모든 브라우저는 우리가 원하는대로 작동합니다.

다음은 간단한 예입니다.

<html> 
<body> 
    <div style="width:250px; overflow:hidden; background-color:#dddddd;"> 
     <p> 
      Here is some text that appears within the primary outer box. 
     </p> 
     <div id='popup2' style="position:absolute; z-index:500; top:0px; left:0px; width:400px; height:200px; background-color:pink;"> 
      <a href="#" onclick="document.getElementById('popup2').style.display = 'none'; return false;">Close</a><br/> 
      This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. 
      This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. 
      This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. This is the popoup. 
     </div> 
    </div> 
</body> 
</html> 
+0

어떤 버전의 IE이고 doctype/compatible 모드입니까? –

+0

절대 대신 고정을 사용해 보셨습니까? – Vladimir

+0

IE-8과 IE-9는 둘 다 똑같이 나타납니다. 파일에 doctype이 없습니다 (하나를 제안한다면, 나는 그것을 넣을 것입니다). 게시 된 코드는 내가하려고하는 간단한 사례입니다. – Dan477

답변

1

나는 순간에 IE9에서 테스트 할 경우에만 수 있어요,하지만 당신은 엄격한 문서 타입을 포함 할 경우 제대로 작동합니다

http://jsfiddle.net/wgWZv/

jsfiddle은 HTML 5

<!DOCTYPE HTML> 
를 사용

나는 4 개의 엄격한 테스트를 거쳤으며 잘 작동한다.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
+0

감사합니다. 나는 을 추가했으며 IE8과 IE9에서 모두 작동합니다. 나는 IE-7이나 IE-6을 테스트 할 수는 없지만 누구나 테스트를 해보면 흥미로울 것입니다. – Dan477