我想要的是一个两列的 CSS 布局,有一个固定的侧边栏(在右边),比如说 300px 宽,以及一个可以扩展以适应屏幕大小和高度的流体左列,然后提供一个垂直的如果内容需要,左侧列上的滚动条。
如果有人可以提供帮助,我将永远感激不尽。
这是我到目前为止所拥有的...
<html>
<head>
<style type="text/css">
body {margin:0px;}
#outer {
overflow: hidden;
width: 100%;
height:608px;
background: #ddd;
}
#inner1 {
float: right;/* Make this div as wide as its contents */
width:300px;
padding:10px;
background: #fdd;
}
#inner2 {
overflow: hidden;/* Make this div take up the rest of the horizontal space, and no more */
padding:10px;
background: #ddf;
#divScroll {
overflow: scroll;
height:600px;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner1">
inner div 1. Some text...
</div>
<div id="inner2">
<div id="divScroll">
inner div 2... <br />
inner div 3... <br />
inner div 2... <br />
.
.
enough text here to make it scroll !
.
.
inner div 2... <br />
inner div 2... <br />
inner div 2... <br />
inner div 2... <br />
</div>
</div>
</div>
</body>
</html>