2016-03-28 21 views
1

我試圖保持一個單元格中的文本行不會移動到下一行,但是當使用white-space: nowrap;時,先前覆蓋屏幕100%的圖像背景被截斷,如所看到的在這個截圖:當使用nowrap時表格背景圖像的截止

前後:

enter image description here

這是後臺代碼:

div.transbox { 
margin: 0px; 
width: 100%; 
height: 100px; 
background-image: url('http://almosthome2016.org/images/header_trans_bg.png'); 
} 

和表格的HTML:

<div class="transbox"><table width="100%" border="0" cellpadding="10" cellspacing="0"> 
<tr> 
<td width="3%" align="left" valign="bottom"></td> 
<td align="left" valign="bottom" class="style74"><span class="style8">ALMOST HOME</span> &nbsp;&nbsp;<span class="style75">THE CAMPAIGN FOR THE NEW IRISH ARTS CENTER</span></td> 
<td align="left" valign="bottom" class="style75">&nbsp;</td> 
</tr> 
</table> 
</div> 

這是我的方式獲取不透明的背景作爲表的後面。如果這是造成nowrap問題的原因,我願意接受其他建議。

謝謝!

回答

0

嘗試增加:

background-size:cover; 

你的CSS爲div.transbox