사이트 내 전체검색
[javascript] 하단 위치 (배너) 고정 방법
로빈아빠
https://cmd.kr/javascript/605 URL이 복사되었습니다.

본문

<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>하단고정레이아웃</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
html {  overflow: hidden;  }
html, body { width: 100%; height: 100%; margin: 0; padding: 0;}
#wrapper{  width: 100%; height: 100%; position: absolute; overflow-y:scroll;}

#content {
    width: 100%; height: 1000px;
    margin-left: -17px; /* 우측 스크롤바가 보여야 하므로 17px만큼 외쪽으로 땡겨주기 */
    padding-left: 17px; /* 좌측으로 들어간만큼 패딩값 지정 */
    }

#footer {
    overflow: hidden;
    position: absolute;
    bottom: 0;
    height: 50px; width:100%; text-align: center;
    margin-left:0px; margin-bottom:-1px;
    }

</style>

</head>

<body>

<div id="wrapper">

    <div id="content">
        본문내용...
    </div>
       
</div>

    <div id="footer">
    풋터내용
    </div>
   
</body>
</html>

댓글목록

등록된 댓글이 없습니다.

831 (1/17P)

Search

Copyright © Cmd 명령어 3.135.183.89