如何删除两个单元格之间的空间 [英] How to Remove the Spaces between two cells

查看:92
本文介绍了如何删除两个单元格之间的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<table id="tab" width="100%" style="border-right-style: solid; border-right-width: thin" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td   align="left" width="60%" style="border-right-style: solid ; border-right-width: thin" height="100%" colspan="0" rowspan="0" valign="middle">
 </td>
 <td  align="right" width="40%" height="100%" colspan="0" rowspan="0" valign="middle">
  </td>

推荐答案

从此HTML中删除所有stylewidthcellspacing属性,您会发现差距大大减小了. :-)

请参阅我对这个问题的评论.

下次,再也不会做这种事情.仅使用CSS,并且始终在head元素下的单独linkstyle元素中使用 .如何?好吧,您没有告诉我们您想要实现什么渲染.首先以正确的方式进行操作,然后如果失败,再问另一个问题,然后详细描述您的目标.

有关在HTML文档中正确引用CSS或嵌入CSS的信息,请参见:
http://www.w3.org/TR/html4/present/styles.html [ ^ ].

要学习样式,请从此处开始:
http://en.wikipedia.org/wiki/CSS [ http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28CSS%29 [ ^ ],
http://www.w3.org/Style/CSS/ [ http://www.webtutorialplus.com/css3-generator.aspx [ ^ ].

—SA
Remove all style, width and cellspacing attributes from this HTML, and you will see that the gap is greatly reduced. :-)

Please see my comment to the question.

Next time, never ever do such things. Use CSS and only CSS, and always in separate link or style elements under the head element. How? Well, you did not tell us what rendering you want to achieve. Do it the right way first, and then, if you fail, ask another question, but then describe your goal in detail.

On proper referencing of CSS in HTML documents or embedding them, please see:
http://www.w3.org/TR/html4/present/styles.html[^].

To learn styles, start here:
http://en.wikipedia.org/wiki/CSS[^],
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28CSS%29[^],
http://www.w3.org/Style/CSS/[^].

This can be a useful tool for you: http://www.webtutorialplus.com/css3-generator.aspx[^].

—SA


这篇关于如何删除两个单元格之间的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆