这个流氓空白从哪里来?
这是 Opera 使用 FireFly 的屏幕截图。它清楚地说明了文本框的内边距 (5px) 和边距 (0px)。然而,文本框的右侧有一个大约 10 像素的未识别黑色空间,它不是 HTML 空白、td
填充、文本框边距或我能想到的任何其他内容。
FireFox 和 IE 9 中也存在这种间距。
(请忽略以下按钮具有相同缩进的事实 - 在这种情况下,我已将 padding-right 添加到 td
作为一种黑客手段,以使其均匀出)
有什么想法吗?
This is a screenshot from Opera using FireFly. It clearly illustrates the padding (5px) and margin (0px) of the textbox. However, to the right of the textbox is an unidentified black space of approximately 10px that isn't HTML whitespace, td
padding, textbox margin or anything else I can think of.
The spacing also exists in FireFox and IE 9.
(Please ignore the fact that the below button has the same indent - in its case I've added padding-right to the td
as a hack to even it out)
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确实应该发布代码本身,而不是发布正在发生的事情的图像。如果您使用
,请确保
紧跟在最后一段内容之后:
You should really be posting the code itself rather than an image of what's going on. Make sure if you're using
<td>
that the</td>
immediately follows the final piece of content:即使是我们中最好的人也可以完全空白......我的问题的原因显然是文本框的宽度没有设置为填充
td
的宽度。增加宽度解决了这个问题。由于某种原因将其设置为 100% 会超出
td
的范围,但这是一个不同的问题。@Tim Post:这是以下问题的答案我的问题,而不是评论 - 请不要不假思索地删除答案。
Even the best of us can blank completely... The reason for my problem is obviously that the width of the textbox isn't set to a width that will fill the
td
. Increasing the width fixed that problem.Setting it to 100% for some reason pushes it beyond the bounds of the
td
though, but that's a different problem.@Tim Post: This is the answer to my problem, not a comment - Please don't just delete answers without a second thought.