我试图设计一个使用无表格布局的网页;但是,当涉及到页面的高度时,我遇到了问题。我使用jquery手风琴来尽量减少页面中滚动条的使用。但是,当我折叠手风琴时,我正在经历div的重叠。手风琴部分与页面的底部边缘重叠并与页脚重叠。我如何自动调整页面的高度,而不会与页面中其他div的重叠。页面布局中的自动div高度调整
就好像你可以附加的图像是我做的基本布局。页面的内容部分将被动态填充;所以我需要自动调整内容div的使用css
谢谢! Nhoyti alt text http://img13.imageshack.us/img13/9438/layoutfq.jpg
这里是我所做的html代码;你能帮我解决吗?
<!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 http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body
{
margin:0px;
padding:0px;
}
#pageholder
{
width:980px;
margin-left:auto;
margin-right:auto;
text-align:center;
border:solid 1px #000;
}
#header
{
width:978px;
height:120px;
border:solid 1px red;
text-align:center;
}
#navigation
{
width:200px;
height:720px;
margin:5px;
border:solid 1px cyan;
text-align:center;
}
#contents
{
width:700px;
height:720px;
margin:5px;
margin-left:270px;
margin-top:-724px;
border:solid 1px blue;
text-align:center;
}
#footer
{
width:970px;
height:50px;
border:solid 1px green;
text-align:center;
}
</style>
</head>
<body>
<div id="pageholder">
<div id="header">header</div>
<div id="navigation">navigation</div>
<div id="contents">contents</div>
<div id="footer">footer</div>
</div>
</body>
</html>