修改模版時,遇到一些CSS的問題 - 部落格

Table of Contents

原始的模版是下載這個:

http://btemplates.com/2008/08/31/outdoor/

這是我修改後的xml檔: http://tinyurl.com/y9nqncz

網址(測試用的,非廣告): http://tinyurl.com/yagqyga

1. 加了一些東西進去,但是發現<code></code>顯示有點奇怪,

正常應該是長這樣: http://tinyurl.com/yblxtsm

奇怪的是,<code>超連結</code>才會有問題,

<code>純文字</code>就不會有問題。

底下是我使用的CSS:

code {
display: block;
font-family: 'Courier New';
font-size: 10pt;
overflow: auto;
border: 1px solid #ccc;
margin: 10px;
padding: 10px 10px 10px 25px;
max-height: 150px;
line-height: 1.5em;
letter-spacing: 0px;
color: #000;
background: #ccc url(http://tinyurl.com/yc6z96s) left top repeat-y;
}
code.cmd {
font-size: 10pt;
color: #ccc;
background: #000 url(http://tinyurl.com/ycrgedt) left top repeat-y;
}
code.ref{
display: block; /* fixes a strange ie margin bug */
background: #fff url(http://tinyurl.com/yegwc4y) left top repeat-y;
border: 1px dashed #333;
font-size: 10px;
line-height: 1.5em;
}

2. #content-wrapper 的寬度是 910px

#main-wrapper 的寬度是 620px

#sidebar-wrapper 的寬度是 280px

#main-wrapper + #sidebar-wrapper 的寬度 = 900px < 910px

但是sidebar卻整個被擠到下面去,目前找不到原因 0rz

以上兩個問題,麻煩大家了,謝謝。

--

All Comments

Franklin avatarFranklin2009-10-08
不是只加620+280就好,你沒把邊界算進去…
Joe avatarJoe2009-10-09
預留一些空間比較好喔:p..
David avatarDavid2009-10-11
像我前陣子也是忍痛拓寬content wrapper
再花整個晚上設計新的header..
Thomas avatarThomas2009-10-12
最後才讓main/siderbar 擺設達到自己接受的程度