[問題] 在IE6有div超出邊界無法看見?..

看板Web_Design作者 (sebastien)時間18年前 (2008/02/28 19:45), 編輯推噓1(108)
留言9則, 4人參與, 最新討論串1/1
這是我的blogger的排版問題http://lamemoire0117.blogspot.com 在之前我修改CSS增加了#maintop1-wrapper、#maintop2-wrapper、#maintop3-wrapper 三個div用來放置網頁元素的(現在maintop3沒在用)。 修改完成後,卻發現我的#footer-wrapper始終緊貼著#main-wrapper, 即,在看一些篇幅較短的文章時,本文區的長度就會比側邊欄區短; 這時#footer-wrapper的顯示位置卻不是在#main-wrapper+#sidebar-wrapper兩者之下。 ──而是依然在#main-wrapper之下,也就是說多出本文區長度的部分側邊欄,會跨過 #footer-wrapper而繼續往下延伸。↓ ┌────────────────────────────┐ │#header │ └────────────────────────────┘ ┌#content────────────────────────┐ │┌─────┐┌─────┐┌─────┐┌─────┐│ ││#maintop1 ││#maintop2 ││#maintop3 ││#siderbar ││ │└─────┘└─────┘└─────┘│ ││ │┌───────────────────┐│ ││ ││#main ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ │└───────────────────┘│ ││ └─────────────────────┤ ├┘ ┌─────────────────────┤ ├┐ │#footer │ ││ └─────────────────────┤ ├┘ │ │ └─────┘ 我想說不定是因為#siderbar-wrapper的position: absolute所造成的? 所以使#footer-wrapper的位置就不會依著#siderbar, 但要不是設定absolute,側邊欄就會跑到文章區下面啦; 也都加過clear: both,但依然無效... 另外在firefox中所有區域都可以看得見;但在ie6中畫面只能顯示到#main的底端, 整個#footer和超越#main底邊的部分#sidebar都超出可瀏覽邊界而不可見?! 請問以上兩個套黃色的問題要如何修正呢如何修正?謝謝! -- 《The words; the memory.》 ~ http://lamemoire0117.blogspot.com/ ~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.162.100.165 ※ 編輯: astro117 來自: 218.162.100.165 (02/28 19:46)

02/28 20:01, , 1F
試試 content 加入 overflow:auto 的屬性看看
02/28 20:01, 1F

02/28 20:28, , 2F
我加了後在ff有效可是在IE6卻和原先一樣耶?..
02/28 20:28, 2F

02/28 20:35, , 3F
以前有遇過類似的問題,IE6 要在 sidebar 跟 content 的
02/28 20:35, 3F

02/28 20:35, , 4F
結束 tag </div>中間加個空白還是 &nbsp; 才會自動長高
02/28 20:35, 4F

02/28 20:36, , 5F
好像是降吧,不過後來我直接改掉那些 block 的結構了。
02/28 20:36, 5F

02/28 20:37, , 6F
有點不太記得細節
02/28 20:37, 6F

02/28 20:42, , 7F
嗯謝謝我去GOOGLE看看您說的找找~
02/28 20:42, 7F

02/29 01:28, , 8F
我看過的做法是content加上overflow:none,且不指定高度
02/29 01:28, 8F

03/05 00:27, , 9F
content的overflow設定為hidden可以解決IE6的
03/05 00:27, 9F
文章代碼(AID): #17nfxISa (Web_Design)