作者ateclean (阿灾)
看板Web_Design
标题Re: [问题] CSS div positioning
时间Thu May 8 01:09:18 2008
div { text-align: center;}
div.window {
position: fixed;
top: 7%;
left: 5%;
right: 5%;
bottom: 5%;}
div.info {}
div#as { height: 50%;}
div.editor {
height: 70%;
overflow: auto;
margin: 10px 0;}
div.buttons {}
<div class="window">
<div id="as">
<div class="info">
info<br />
info<br />
info
</div>
<div class="editor">editor<br />
editor<br />
editor<br />
editor...
</div>
<div class="buttons">
buttons
</div>
</div>
</div>
看起来就是
http://img381.imageshack.us/my.php?image=00sp2.jpg
多用了一层<div>
小声说,我觉得你描述的文字有点赘 ^^" 会有点让人眼花
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.7.59
1F:推 lgzenith:IE到目前好像都还没有支援position:fixed 05/08 01:15
2F:→ ateclean:XD 原PO的原文里也用到了fixed 不过这很麻烦就是了 05/08 01:33
3F:→ xam:#as 看起来没有特殊用途耶, 感觉是不必要的? 05/08 01:41
4F:→ ateclean:去掉看看 05/08 01:51
5F:→ starjou:现在的问题是 editor 的高度 需要是弹性的 05/08 02:35
6F:推 yllan:抱歉,我以为写详细一点比较好理解,没想到反而模糊焦点... 05/08 10:44