나는 머리글, 바닥 글 및 두 개의 열이있는 레이아웃을 얻으려고합니다. 사이트의 너비는 화면 해상도 및 높이에 상대적이어야합니다. 오른쪽 열의 폭은 250px 여야합니다. 내용이 큰 경우 왼쪽 열 (내용)에 세로 스크롤 막대가 있어야합니다.콘텐츠 div 나머지 높이
다른 말로하면 머리글, 바닥 글 및 오른쪽이 항상 보이고 고정되어야합니다. 필요한 경우 콘텐츠에 세로 스크롤 막대가 있어야합니다.
감사
편집 :
<!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>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<style type="text/css">
body {
font: 11px Tahoma, Arial;
margin: 0;
padding: 0;
color: #3d5770;
background-color: #A7A7A7;
}
#wrapper
{
min-width: 987px;
margin-left: auto;
margin-right: auto;
width: 98%;
}
#header
{
background-color: orange;
clear: both;
float: left;
width: 100%;
height:100px;
background-color: orange;
}
#main
{
width: 100%;
background-color: White;
}
#footer
{
position: absolute;
bottom: 0px;
height: 30px;
clear:both;
background-color: aqua;
margin-left: auto;
margin-right: auto;
width: 98%;
}
#content
{
position: absolute;
top: 100px;
bottom: 30px;
overflow: auto;
margin-right: 262px;
background-color: White;
}
#right
{
width: 245px;
float: right;
}
#rightInner
{
position: absolute;
top: 100px;
bottom: 30px;
width: 244px;
background-color: Lime;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">header</div>
<div id="main">
<div id="right">
<div id="rightInner">Banners</div>
</div>
<div id="content">Dynamic content Dynamic content Dynamic content Dynamic content Dynamic content Dynamic content Dynamic content </div>
</div>
<div id="footer">footer</div>
</div>
</body>
</html>
당신이 볼 수 있듯이
는, 컨텐츠 사업부가 수평입니다 성장하고 높이가 화면의 최대 높이입니다. 이것은 내 22 "화면에서 잘 작동하지만 난 화면 크기를 변경할 때 나는
Google에서 볼 수있는 코드가 있습니까? 이 예제를 가지고있는 곳이 많이 있습니다 - 하나의 가능한 링크 : http://www.456bereastreet.com/lab/developing_with_web_standards/csslayout/2-col/ –
무엇이 질문입니까? 너 뭐 해봤 니? – Polynomial
http://rentacoder.com이 더 적절하다고 생각합니다. – deviousdodo