post by tommy @ 07 九月, 2006 17:43
今天把系統升級到 1.1 版之後, 就順便測了一下這個問題. 由於我在 table 內都是存放一些程式碼, 也就是用 <pre> 來放, 如果裡頭的內容會到整頁的 100% 或以上時, 就會造成 IE6 在顯示這個 table 之前, 有一大段空白.
下午試著把 table 移除, 直接用 <pre>, 再把 TinyMCE 裝上 style 這個 plugins, 用來設定 CSS 的內容. 結果, 發現會有一樣的問題. 接著試著把寬度改成 80%, 結果... 就正常了... 試了一下, 在 99% 以上時, IE6 就會留下一大段空白. 設成 98% 的寬度後, 就正常了.
所以把文章中原本使用 table 的部份, 都直接用 <pre> 來處理, 並且修改我用的 template 中的 style.css, 加上下列這段:
/* twu2 begin, code attribute */
pre {
border-style: outset;
border-width: thin;
overflow: auto;
font-family: Courier New,Courier,mono;
background-color: #ccffff;
width: 98%;
padding: 1px;
margin: 1px auto 1px auto;
max-height: 100em;
}
/* twu2 end, code attribute */
這樣子, 在文章中, 只要使用到 <pre> 就會出現與之前使用 table 來處理差不多的效果了.
另外, 在 TinyMCE 的 js/tinymce/themes/advanced/css/editor_content.css 中也加上同樣的設定, 就可以在 TinyMCE 中, 如果選擇使用 <pre> 時, 即時出現同樣的效果了.
我想, 這個應該是 IE6 的問題可能性會比較大一些.