2016-03-28 58 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