如何消除表边框和表格内容之间的空间? [英] How to eliminate space between table border and table contents?
问题描述
我有一个简单的html页面,其中包含一个表格单元格中的图像,
被边框包围:< http://www.softrains.com/lc/test.html> 。我想
想要消除桌边和桌子之间的空间
的内容。我已经尝试在CSS中设置margin:0,以及HTML中的
cellmargin / cellpadding。
消除额外空间的最佳方法是什么表格边框之间
及其内容?
谢谢,
-Mike
I have a simple html page that contains an image in a single table cell,
surrounded by a border: <http://www.softrains.com/lc/test.html>. I would
like to eliminate the space between the table border and the table
contents. I have tried setting margin: 0 in CSS everywhere, as well as
cellmargin/cellpadding in HTML.
What is the best way to eliminate the extra space between a table border
and its contents?
Thanks,
-Mike
推荐答案
Michael Mayo写道:
Michael Mayo wrote:
我有一个简单的html页面,其中包含一个表格单元格中的图像,
被边框包围:< http://www.softrains.com/lc/test.html> ;.我想要消除桌边和桌子之间的空间
内容。
消除桌边
与其内容之间的额外空间的最佳方法是什么?
I have a simple html page that contains an image in a single table cell,
surrounded by a border: <http://www.softrains.com/lc/test.html>. I would
like to eliminate the space between the table border and the table
contents.
What is the best way to eliminate the extra space between a table border
and its contents?
添加边框折叠:折叠到桌面样式
Louise
Add border-collapse:collapse to table style
Louise
Michael Mayo写道:
Michael Mayo wrote:
我有一个简单的html页面,其中包含一个表格单元格中的图像,
被边框包围:< http:// www.softrains.com/lc/test.html> ;.我想要消除表边框和表格内容之间的空间。我已尝试在CSS中设置margin:0,以及HTML中的cellmargin / cellpadding。
消除表边界之间额外空间的最佳方法是什么?
和它的内容?
I have a simple html page that contains an image in a single table cell,
surrounded by a border: <http://www.softrains.com/lc/test.html>. I would
like to eliminate the space between the table border and the table
contents. I have tried setting margin: 0 in CSS everywhere, as well as
cellmargin/cellpadding in HTML.
What is the best way to eliminate the extra space between a table border
and its contents?
不要用桌子。使用样式表或本地样式
设置图像本身的边框。使用具有居中风格的div
居中图像:
< div style =" text-align:center">< img。 。 。>< / div>
(但我可能会使用< p align =" center">,这仍然是HTML 4.01过渡时允许的
。)
表格应仅用于以表格形式显示信息
安排。
-
David E. Ross
< URL:http://www.rossde.com/>
我使用Mozilla作为我的Web浏览器,因为我想要一个符合Web标准的浏览器。请参阅< URL:http://www.mozilla.org/>。
Don''t use a table for this. Use a style-sheet or local style to
set the border on the image itself. Center the image using a div
with a centered style:
<div style="text-align:center"><img . . .></div>
(But I would probably use <p align="center">, which is still
tolerated under HTML 4.01 transitional.)
Tables should be used only to present information in a tabular
arrangement.
--
David E. Ross
<URL:http://www.rossde.com/>
I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
为什么不删除表格并添加
style =" border:solid#41A0D0 2px;"
图片本身?这不是你想要的吗?
Why not eliminate the table and just add
style="border: solid #41A0D0 2px;"
to the image itself? Is that not what you want?
这篇关于如何消除表边框和表格内容之间的空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!