+-------------+ +---------------------------------+
| | | |
| 1 | | |
| left-nav | | |
| | | |
+-------------+ | 3 |
| | | |
| | | |
| 2 | | very long contents here |
| | | which causes to scroll |
| other | | vertical bar. Setting |
| remaining | | this content to 100% height? |
+-------------+ +---------------------------------+
什么是身高:100%;实际上?它是应用于页面窗口还是直到滚动结束?我有以下html...
<div id="wrapper">
<div id="left-nav">
<!--contents of 1-->
</div>
<div id="yourad">
<!--contents of 2--->
</div>
<div id="main-contents">
<!--contents of 3-->
</div>
</div>
我的CSS如下....
#wrapper{position: relative; width: 1007px; margin: 0 auto;}
#left-nav{width: 329px; height: 100%; background: grey;float: left;}
#yourad{height: 100%; background: blue;}
#main-contents{margin-left: 329px; padding: 10px; background: pink;}
****笔记: ****
首先看我的演示以了解我的问题在这里
1实际身高的内容:我不知道。
2实际身高的内容:我不知道。
3 实际身高的内容:我不知道。
因为我可能需要一些页面更少的内容和一些页面更多的内容。
我尝试过height: 100%;
在 html、body、wrapper、left-nav、yourad 中使用,但没有成功。