가로형 높이 100% 잡는 법..ㅠ레이아웃
관련링크
본문
css 부분
/* 왼쪽 레이아웃 */
/* 상단 레이아웃 */
html, body{height:100%; padding:0px; margin:0px;}
#hd {z-index:4;position:absolute; top:0px; left:0px; width:20%;float:left; background:#ef9800; }
.hd_zindex {z-index:10 !important}
#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#hd_wrapper {position:relative; zoom:1}
#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#wrapper {z-index:4;zoom:1;}
#container_title { overflow:hidden;width:1px;height:1px;font-size:0;line-height:0;}
#container {z-index:4;position:absolute;top:0; left:20%; display:inline-block; height:auto !important; height:100%; min-height:100%; _height:expression(parentNode.offsetHeight); float:left;font-size:1em;zoom:1; }
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title { overflow:hidden;width:1px;height:1px;font-size:0;line-height:0;}
------------
제이쿼리
<script>
</script>
var ch = $('#container').height();
$('#hd').css('height', ch);
$('#aside').css('height', ch);
$('.aside_btn').css('height', ch);
});
</script>
-------------------
<div id="hd">
왼쪽 메뉴부분들
</div>
내용부분
<div id="wrapper">
<div id="container" >
내용
</div>
</div>
--------------------------------------------------
레이아웃잡았는데요
메인까지는 잘되는데;;; 화면이 깨져요;;
기본 레이아웃에서 잡은거라서요;;
제이쿼리 때문에 높이는 잡히는데;;;
다른페이지가 넘어가면 ;; 전페이지 잡은 높이로만 되서;; 짤려요..ㅠㅠㅠ
고수님들의 의견 부탁드릴게용
왼쪽 부분높이 100% 잡는 방법이 없을까용?
답변 3
<style>
html, body {height:100% padding:0; margin:0;}
.div1 {height:100%}
</style>
<div class='div1'>contents</div>
height;를 100 퍼로 해도안되나요?
html, body{height:100%; padding:0px; margin:0px;}
이 부분을
html, body{height:100%; padding:0px; margin:0px; overflow:hidden; }
으로 바꿔보세요.