曾试图找到解决办法,而且确实可以提出任何东西。 这里符合我所希望做的基本内容。
Would like to have my layout in 3 divs, section 1 is a header (logo), section 2 is a horizontal menu, section 3 is the menu specific content that changes based on your menu selection. I would like for there to be no browser scroll bar, and for section 1 and 2 to always appear, with section 3 extending to the bottom of the browser window with an scollbar always visible. I ll put my code at the end, but it works fine in FF, but not IE8. I have read that you can t use top and bottom in the same div, but why not? it works as intended in FF just fine. I ve tried setting top and using height 100%, but since I m setting the top at 163, it puts the bottom at 163 px below the window. I want section 3 to grow and shrink as the window expands or shrinks vertically. Here s my much simplified code. I ve used inline styles to minimize working with multiple files and for ease while testing. index.css is inconsequential in this context.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title>Test Junk</title>
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<div style="background-color:#cccea2; text-align:center;height:136">
section 1
</div>
<div style="background-color:#ccace2; text-align:center;height:27">
section 2
</div>
<div style="background-color:#225522; text-align:center;position:absolute;top:163;bottom:0;width:100%;overflow-y:scroll;overflow-x:hidden;">
section 3
</div>
</body>
</html>
UPDATE: Im利用xhtml doc类型取得了一些成功,致力于找到一个好的解决方案。 但我发现,这是另一个例子,同时我继续长期寻求解决办法。 我仍真的不了解你为什么不能在同一批次中使用联塔办事处和BOTTOM,它们是两个截然不同的东西。