不同浏览器之间表格单元格上的背景图像存在问题
我有一个 css 设计,在 Firefox 中显示正确。但是,当使用 Firefox 或 Chrome 打开时,单元格的背景图像会出现问题。
问题在于带有背景图像的单元格被拉长。我不知道如何解决这个问题。我已经定义了单元格的大小,但 Chrome 和 Explorer 表不尊重该值。
<table border="0" cellspacing="0" cellpadding="0" height="463px">
<tr>
<td rowspan="4" >
<img src="images/principal.gif" border="0" lenght="1037px" height="463px" />
</td>
<td height="146px" id="celda" style="padding:15px;background-image:url(images/capdreta.gif);background-repeat: no-repeat; border:0;" >
<p class="titol"> Anuncio Publicitario</p><br />
<p class="text">Inserte un anuncio <br/>publicitario en tu app</p> <br />
<a href="#">Más Información</a>
</td>
</tr>
<tr>
<td><img src="images/iadd.gif" border="0"/></td>
</tr>
<tr>
<td height="111px" id="celda" style="padding:15px;background-image:url(images/spacegris.gif);background-repeat:">
<p class="titol"> Anuncio Publicitario</p><br/>
<p class="text"> Inserte un anuncio <br/>
publicitario en tu app</p><br />
<a href="#">Más Información</a>
</td>
</tr>
<tr>
<td height="90"><img src="images/rss.gif" border="0"/></td>
</tr>
</table>
I have a design in css when displayed in Firefox appears correctly. But when opened with Firefox or Chrome there is a problem with the background images of the cells.
The problem is that cells with background images are elongated. I not sure how to fix this. I have defined the size of the cells but the Chrome and Explorer table do not respect this value.
<table border="0" cellspacing="0" cellpadding="0" height="463px">
<tr>
<td rowspan="4" >
<img src="images/principal.gif" border="0" lenght="1037px" height="463px" />
</td>
<td height="146px" id="celda" style="padding:15px;background-image:url(images/capdreta.gif);background-repeat: no-repeat; border:0;" >
<p class="titol"> Anuncio Publicitario</p><br />
<p class="text">Inserte un anuncio <br/>publicitario en tu app</p> <br />
<a href="#">Más Información</a>
</td>
</tr>
<tr>
<td><img src="images/iadd.gif" border="0"/></td>
</tr>
<tr>
<td height="111px" id="celda" style="padding:15px;background-image:url(images/spacegris.gif);background-repeat:">
<p class="titol"> Anuncio Publicitario</p><br/>
<p class="text"> Inserte un anuncio <br/>
publicitario en tu app</p><br />
<a href="#">Más Información</a>
</td>
</tr>
<tr>
<td height="90"><img src="images/rss.gif" border="0"/></td>
</tr>
</table>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的
标记应具有属性
width
,而不是lenght
(该属性不存在)请参阅演示(图像当然不起作用,因为我没有它们的网址)
Your
<img>
tag should have the propertywidth
instead oflenght
(which doesn't exist)See the demo (images won't work of course since I don't have their URLs)