【发布时间】:2012-07-07 01:22:33
【问题描述】:
我有一个两列布局,它在调整以摆脱身体上的双滚动条时停止工作。现在我在 wrap 上有一个滚动条,这是我想要的,但内容不知何故与滚动条的宽度重叠。
html, body {
margin:0;
padding:0;
font: 12px Geneva, Verdana, sans-serif;
color: #1e1f21;
vertical-align: top;
height: 100%
}
body {
background: #fff url(../esimages/cubes.png) no-repeat left bottom fixed;
}
#wrap {
background: #f5f5f5;
margin: 0 auto;
width: 960px;
height: 100%;
}
#logo {
height: 75px;
width: 100%;
background: #1e1f21;
padding: 10px 0px 5px 0px;
}
#header {
height: 30px;
width: 100%;
background: #1e1f21;
margin:0px;
padding: 0px;
}
#container {
overflow: hidden;
height: auto;
background: #f5f5f5;
width: 100%;
margin: 0px;
padding: 0px;
text-align: left;
}
#content1 {
min-height: 100%;
background: #f5f5f5;
padding: 20px 20px 20px 40px;
margin: 0
}
#content2 {
float: right;
width: 290px;
min-height: 100%;
background: #f5f5f5;
padding: 20px 0px 20px 10px;
margin: 0
}
#footer {
clear: both;
padding: 10px;
background: #1e1f21;
text-align: center;
line-height: 200%;
font-size: 10px;
}
这两个内容框无法按应有的方式并排放入容器中。我已经尝试为 content1 使用不同的缩小固定宽度,但它根本没有区别,并且列宽无论如何都保持不变。我把头发扯掉了,因为这不合逻辑!
<body>
<div id="wrap">
<div id="logo"></div>
<div id="header"></div>
<div id="container">
<div id="content2">
<div class="box0">
<ul>
<li></li>
</ul>
</div>
</div>
<div id="content1">
<p></p>
</div>
</div>
<div id="footer" align="center"></div>
【问题讨论】:
-
你能发布html吗?
-
对不起,不擅长贴代码...
-
对不起,我很愚蠢,但我怎样才能发布 html?它不允许我复制和粘贴。
-
@DavidAleu
P>
您必须编辑您的问题...我已经为您完成了
标签: html css two-column-layout