开发者

Where is this rogue white-space coming from?

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 approximate开发者_StackOverflow社区ly 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)

Where is this rogue white-space coming from?

Any ideas?


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>
    <input type="text"></td>  <!-- No space here, not even a CRLF -->


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜