모두 안녕100 % div 높이
유체 레이아웃으로 웹 페이지를 디자인하고 있습니다. 100 % 너비와 100 % 높이를 유지하고 싶습니다. 문제는 div "left"와 "right"를 부모 div의 "wrapper"안에 100 % 높이로 유지하는 방법을 모른다는 것입니다.
<div id="container" style="width:100%; height:100%">
<div id="header" style="width:100%; height:100px">
</div>
<div id="wrapper" style="width:100%; height:(100% - 100px)">
<div id="left" style="width:250px; height:(100% - 100px)">
</div>
<div id="right" style="width:(100% - 250px); height:(100% - 100px)">
</div>
</div>
</div>
도와주세요. doctype.com에서
이대답
CSS
html, body{
height: 100%;
margin: 0;
padding: 0;
}
HTML
<body>
<div id="container" style="width:100%; height:100%; position: absolute;">
<div id="header" style="width:100%; height:100px;">
header
</div>
<div id="wrapper" style="width:100%; height:auto; position: absolute; top: 100px; bottom: 0;">
<div id="left" style="width:250px; height:100%; float:left;">
left
</div>
<div id="right" style="width: 250px; height:100%; float:right; ">
right
</div>
main content
</div>
</div>
</body>
제휴 사이트 doctype.com에서 질문하면 대답 할 가능성이 더 높습니다. – Spoike