위토즈 - 개발자프로그램판매공간

정보공유

[퍼블리싱] div 기본 레이아웃 샘플

 

 

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

 <title>WebBrochure</title>

 <style type="text/css">

  html, body {

   height: 100%;

   overflow: hidden;

  }

  body {

   font: 62.5% Verdana;

   margin: 0em;

   padding: 0em;

  }

  div {

   margin-right: auto;

   margin-left: auto;

  }

  div#container {

   height: auto !important;

         height: 100%;

         min-height: 100%;

         background: #82C71B;

         width: 80em;

  }

  div#header {

   height: 10em;

   background: #FF9999;

   width: 78em;

  }

  div#content {

   width: 74em;

   overflow: auto;

   background: #FFFFFF;

   padding-right: 1em;

   padding-left: 1em;

  }

  div#footer {

   height: 5em;

   width: 78em;

   background: #999999;

  }

 </style>

 <script type="text/javascript">

  window.onload = function() {

   contentHeight();

  }

  window.onresize = function() {

   contentHeight();

  }

 

 function contentHeight() {

   if (document.getElementById) {

    var windowHeight = getWindowHeight();

    var headerHeight = document.getElementById('header').offsetHeight;

    var footerHeight = document.getElementById('footer').offsetHeight;

    var contentElement = document.getElementById('content');

    //alert("windowHeight:"+windowHeight+",\nheaderHeight: "+headerHeight+", \nfooterHeight:"+footerHeight);

    contentElement.style.height = (windowHeight - (headerHeight + footerHeight)) + 'px';

   }

  }

 

 function getWindowHeight() {

   var windowHeight = 0;

 

  if (typeof(window.innerHeight) == 'number') {

    windowHeight = window.innerHeight;

   } else {

    if (document.documentElement && document.documentElement.clientHeight) {

     windowHeight = document.documentElement.clientHeight  ;

    } else {

     if (document.body && document.body.clientHeight) {

      windowHeight = document.body.clientHeight;

     }

    }

   }

   return windowHeight;

  }

 </script>

 

 

 

  <div id="container">

   <div id="header">HEADER</div>

   <div id="content"><b>CONTENT</b></div>

   <div id="footer">FOOTER</div>

  </div>

 

 

정보공유
Total 443건 29 페이지
번호 제목 글쓴이 날짜 조회
23 정규식 참고 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-27 31490
22 메일주소 정규식 체크 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-25 31838
21 유니크 한 일련번호 생성하기. 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-17 34632
20 원하는 자릿수 만큼 문자열 생성처리 함수. sprintf 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-11 30428
19 jQuery blockUI plugin 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-08 33356
열람중 div 기본 레이아웃 샘플 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-05 34037
17 phpMyAdmin 접속이 localhost 가 아닐경우. 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-03 38029
16 데이터 순서도 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-03 38161
15 영카트 장바구니키 세션을 쿠키로 변경 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 03-02 37986
14 Simple Microphone Recorder 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-26 32033
13 즐겨쓰는 php db 연결문 (접속 - 해제) 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-24 34015
12 달력 함수. 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-24 30797
11 datepicker 예제 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-24 43992
10 MYSQL 1~100까지 랜덤 숫자값 SELECT 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-18 40351
9 GD 를 이용한 그래프 만들기 SAMPLE 2 위토즈쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 02-18 30667