ie 에선 position:fixed 구현이 안되므로 꽁수를 써야한다.
이전에 글을 참조하여 더욱 안정적(?)인 fixed 를 구현해보고자 한다.
html 태그에 overflow:auto 항목을 주는 이유는 ie 에선 기본적으로 disabled 된 스크롤바가 나타나는데 이것을 감추기 위함이다.
또한 style 마지막행에 css selector가 기술되는데 ie 에선 파싱하지 못하므로 ie 외 브라우저만 적용이 가능케 된다.
<head>
이전에 글을 참조하여 더욱 안정적(?)인 fixed 를 구현해보고자 한다.
html 태그에 overflow:auto 항목을 주는 이유는 ie 에선 기본적으로 disabled 된 스크롤바가 나타나는데 이것을 감추기 위함이다.
또한 style 마지막행에 css selector가 기술되는데 ie 에선 파싱하지 못하므로 ie 외 브라우저만 적용이 가능케 된다.
<head>
<style type="text/css">
html{overflow:auto;}
body{
height:100%;
overflow:hidden;
margin:0;padding:0;
}
#body {
height: 100%;
overflow:auto;
}
.fixed {position:absolute;}
#body > div.fixed{ position: fixed; }
</style>
</head>
<body>
<div id="body">
<div class="fixed">
I'm fixed Layer.
</div>
</div>
</body>