Re: [問題] CSS div positioning

看板Web_Design作者 (阿災)時間16年前 (2008/05/08 01:09), 編輯推噓2(204)
留言6則, 5人參與, 最新討論串2/3 (看更多)
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

05/08 01:15, , 1F
IE到目前好像都還沒有支援position:fixed
05/08 01:15, 1F

05/08 01:33, , 2F
XD 原PO的原文裡也用到了fixed 不過這很麻煩就是了
05/08 01:33, 2F

05/08 01:41, , 3F
#as 看起來沒有特殊用途耶, 感覺是不必要的?
05/08 01:41, 3F

05/08 01:51, , 4F
去掉看看
05/08 01:51, 4F

05/08 02:35, , 5F
現在的問題是 editor 的高度 需要是彈性的
05/08 02:35, 5F

05/08 10:44, , 6F
抱歉,我以為寫詳細一點比較好理解,沒想到反而模糊焦點...
05/08 10:44, 6F
文章代碼(AID): #188U91NJ (Web_Design)
文章代碼(AID): #188U91NJ (Web_Design)