CSS line-height 在 firefox 3.0.8 的問題

Posted by: 邱小新 at 上午10:15:00 in
底下這段 CSS 碼中的 line-height 可以使行與行中間隔開好看許多,但是連帶的也是 li 的行與行隔開太遠變得很難看。

.entry { position:relative; color: #000000; line-height: 1.6em; text-align: justify; margin:0px 0 0 0 ; }

所以只要加上 ul 及 li 的 line-height 設定即可。記得千萬不能只有設定 ul 的 line-height 參數,這樣會在 IE6 上顯示錯誤,一定要把 ul 的 line-height 設成 0em 才可以,還有 0 跟 em 中間不能有空格喔。

.entry { position:relative; color: #000000; line-height: 1.6em; text-align: justify; margin:0px 0 0 0 ; } .entry ul { line-height: 0em; } .entry li { line-height: 1.4em; }