CSS实现frameset
首先是HTML代码:
<div id="outer">
<div id="leftFrame" style="width: 20%;">
<div style="height: 30%" id="packageListFrame" title="All Packages" >
Package list goes here
</div>
<div style="height: 70%" id="packageFrame" title="All classes and interfaces (except non-static nested types)" >
Class list goes here
</div>
</div>
<div style="width: 80%;" id="classFrame" title="Package, class and interface descriptions">
Summary details go here
</div>
</div>
添加如下样式:
<style type="text/css">
#outer { position: relative; }
#leftFrame {
position: fixed;
height: 100%;
width: 20%;
top: 0;
}
#classFrame {
position: absolute;
left: 21%;
width: 77%;
}
#packageListFrame{
position: static;
height: 200px;
overflow: scroll; }
#packageFrame {
position: static;
height: 70%;
overflow: scroll;
}
</style>
相关文档:
原文网址:http://www.complexspiral.com/publications
Containing Floats
As powerful and useful as they are, floats can make for tricky layout tools. Chances are that you may have seen something like the situation shown in Figure 1, which is accomplished with just two div elements, each with a floate ......
In this specification, the expression collapsing margins means that adjoining margins (no non-empty content, padding or border areas or clearance separate them) of two or more boxes (which may be next to one another or nested) combine to form a single margin.
In CSS 2.1, horizontal margins ne ......
IE和火狐的css兼容性问题归总
CSS对浏览器器的兼容性具有很高的价值,通常情况下IE和Firefox存在很大的解析差异,这里介绍一下兼容要点。
1、DOCTYPE 影响 CSS 处理
2、FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行
3、FF: body 设置 text-align 时, div 需要设置 margin: aut ......
如果IE6和IE7显示都正常;火狐也没有问题;检查代码也没有误失;就试试加上这段代码
IE8目前还不稳定,腾讯首页利用IE7的内核来渲染IE8,代码如下:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> ......