2011-11-24 48 views
5

我有,我有這個CSS背景問題與谷歌瀏覽器錶行

</tr> 
<tr class="table-top-background" > 
<td class="thread-pic" ></td> 
<td class="thread-top-middle" colspan="2" >Threads</td> 
<td class="thread-information">Last Post</td> 
</tr> 

所以我想給背景圖片到我的TR表,所以我把這個

.table-top-background 

    { 
     background:url('/img/design/extra-large-back.png') no-repeat; 
     position:relative; 
     color:White; 
     height:31px; 
    } 

    .thread-pic 
{ 
    width:30px; 
} 

.thread-information 
{ 
    width:280px; 
} 

.thread-top-middle 
{ 
    width:418px; 
} 

問題是,在所有瀏覽器中,Google Chrome都是好的。 在Google Chrome瀏覽器中,我似乎給出的不是tr的背景,而是所有td的背景......它爲每個td重複相同的背景。

它在IE7中是一樣的,但在一個stackoverflow問題我讀到關於解決這個與position:relative和它的幫助。 但我沒有找到Chrome的任何solutuin。 我試着給TR CSS這樣也

.table-top-background 

{ 
    background:url('/img/design/extra-large-back.png') no-repeat 0% 100%; 
    display:block; 
    position:relative; 
    color:White; 
    height:31px; 
    width:728px; 
} 

但它改變我的所有表的設計。當時的文本在這一標題行的TD的不是那個地方,也所有其他首款TD的我的桌子的尺寸與我的標題tr的尺寸相同。它似乎真的很有趣。

我也試過給display:inline-table而不是display:block,它也沒有幫助我... 這個問題的解決方案是什麼?

編輯:同樣的問題是在Safari中,所以它是webkit的問題。

+0

Duplicate:http://stackoverflow.com/questions/2594428/google-chrome-bug-with-tr-background –

回答

0

使用顯示器要做的伎倆,但它可能在Chrome或其他瀏覽器中有副作用。

+0

它使我的tr尺寸像第二個尺寸...我不知道爲什麼... –