作者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
推 lgzenith:IE到目前好像都還沒有支援position:fixed 05/08 01:15
→ ateclean:XD 原PO的原文裡也用到了fixed 不過這很麻煩就是了 05/08 01:33
→ xam:#as 看起來沒有特殊用途耶, 感覺是不必要的? 05/08 01:41
→ ateclean:去掉看看 05/08 01:51
→ starjou:現在的問題是 editor 的高度 需要是彈性的 05/08 02:35
推 yllan:抱歉,我以為寫詳細一點比較好理解,沒想到反而模糊焦點... 05/08 10:44