【发布时间】:2011-11-11 18:11:42
【问题描述】:
我有一个带有 tr 和两个 tds 的表。第一个 td 包含一个输入(文本),第二个包含另一个输入(图像)。第二个输入应该是一个按钮。我已将 cellpadding 和 cellspacing 设置为零,以便可以附加文本输入和图像按钮,中间没有空格。这适用于 IE 和 Firefox,但不适用于 Chrome。 Chrome 一直在文本输入和按钮之间留出几个像素的空间。我尝试使用 CSS,但似乎没有任何效果。知道 Chrome 的问题可能是什么吗?
<head>
<style type="text/css">
.search{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
color: #4D4D4D;
border: 1px solid #CCCCCC;
height: 21px;
outline: none;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0">
<form method="post">
<tr><td><input type="text" size="30" class="search"></td>
<td><input type="image" src="button.gif" name="submit" id="submit" width="77px" height="21px"></td></tr>
</form>
</table>
</body>
【问题讨论】:
-
"尝试使用 css" 您是否正确重置了填充/边距? (在表格单元格和输入上)
-
有一些代码可以给我们看吗?
-
@weber,编辑您的原始问题以添加您正在使用的未正确显示的代码。注释绝对不是代码的地方。
标签: css forms google-chrome button html-table