【发布时间】:2011-05-01 00:57:36
【问题描述】:
我有以下 HTML 代码:
<body>
<div id="Frame">
<div id="Body">
<div id="Panel">Side panel, fixed width.</div>
<div id="Content">The rest of the content, should be dynamic width and fill up rest of space horizontally.</div>
</div>
<div id="Foot">
<div>FooBar.</div>
</div>
</div>
</body>
我要做的是使#Panel 具有固定宽度(~200 像素)并且位于左侧,并且#Content 紧邻#Panel 的右侧,但属于“动态”宽度并水平填充浏览器屏幕的其余空间。我尝试了很多不同的东西,但无法让它工作——我得到的最远的地方是#Panel 在左边,#Content 在#Panel 的右边并填充其余的空间,但 #Content 从 #Panel 下面开始,而我希望它从相同的垂直位置开始。
我确实找到了In CSS, how do I get a left-side fixed-width column with a right-side table that uses the rest of the width?,但是我无法将它应用到上面的 HTML。
【问题讨论】: