【发布时间】:2020-02-13 09:57:15
【问题描述】:
如何将按钮(提交)精确地对齐到文本或搜索框的右侧,
与搜索框高度相同,
并且没有搜索框和按钮之间的任何水平空白?
这就是我所拥有的
<input type="text" value="" placeholder="search text here" style="display: block; width: 100px; height: 32px; margin: 0px; padding: 0px; float: left;" />
<input type="submit" value=" OK " style="display: block; margin: 0px; width: 20px; height: 32px; padding: 0px; float: left; border-left: none;" />
但按钮和文本框的高度都不相同,更重要的是,我似乎无法摆脱文本框和按钮之间 0.5 到 1 毫米的空间。
【问题讨论】: