HTML 间距问题
我有下面的代码来在 Sharepoint WebPart 内的经典 asp 页面中显示一个简单的表格。共有三个单元格,因为它们分别填充有 ADODB 记录集。
然而......桌子周围有大约四分之一到半英寸的死空白。我希望表格中的数据显示在页面的左上角。有什么想法吗?
<html>
<body >
<table Border="1" width="300" bgcolor="white">
<tr>
<td><FONT face="Arial" color="navy" size=1>DEV DW STATUS: </td>
<td><FONT face="Arial" color="navy" size=1>COMPLETE</td>
<td><FONT face="Arial" color="navy" size=1>11/11/2010 3:41:34 AM</td>
</tr>
</table>
</body>
</html>
I have the below code to display a simple table in a classic asp page inside of a Sharepoint WebPart. There are three cells because they are individually filled with an ADODB recordset.
However....there is about a quarter to half an inch of dead white space around the table. I would like the data in the table to show in the very upper left corner of the page. Any ideas?
<html>
<body >
<table Border="1" width="300" bgcolor="white">
<tr>
<td><FONT face="Arial" color="navy" size=1>DEV DW STATUS: </td>
<td><FONT face="Arial" color="navy" size=1>COMPLETE</td>
<td><FONT face="Arial" color="navy" size=1>11/11/2010 3:41:34 AM</td>
</tr>
</table>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
尝试使用:
Try using:
这样做:
如果你不使用它,也许你还需要设置 border="0" 。
华泰
do this:
maybe you need to set border="0" as well if you don't use it.
HTH
默认情况下,主体有内边距。用来
解决这个问题。
The body has a padding by default. Use
to solve that.
使用开发者工具栏,例如 FireBug 或内置的 webkit 工具栏。使用元素选择器并检查元素的样式。它会告诉你哪里有填充/边距。
Use a developer toolbar such as FireBug or the built in webkit toolbar. Use the element selector and examine the styling of the element. It will show you where there is padding/margin.
这是一个非常好的“主样式表”,可以清除/调整浏览器字段。在应用任何类型的样式之前,您应该始终将所有内容归零。
This is a very good 'master stylesheet' that clears / levels the browser field. You should ALWAYS zero everything out before you apply any kind of styles.
你们听说过将 CSS 放入 STYLE 元素中吗? :)
你知道,内容和呈现的分离......
Did you guys hear of putting CSS inside the STYLE element? :)
You know, separation of content and presentation...