我无法删除两个输入字段之间的边距 [英] I can't remove the margin between two input fields
问题描述
我试图删除搜索栏和Go!之间的空白处按钮: http://beta.linksku.com/
我尝试删除所有样式并添加 margin:0; padding:0; border:none;
,但两个元素之间仍有余量。我无法在JSFiddle上复制这个问题,但它出现在我网站上的所有浏览器中。
code> inline-block 。
通常当你使用 inline-block
元素,你经常在段落中使用它们,所以字母之间的空格必须一致。 inline-block
元素也适用于此规则。
如果您想完全删除空间,那么可以浮动元素。
float:left;
您也可以从模板文档中删除空格。像这样:
< input type =textname =stabindex =2/>< input type =submitvalue =Go! class =btn/>
I'm trying to remove the margin between the search bar and the "Go!" button at the top of this page: http://beta.linksku.com/
I've tried removing all styles and adding margin:0;padding:0;border:none;
, but there is still a margin between the two elements. I cannot replicate this problem on JSFiddle, but it occurs in all browsers on my website.
This is how elements function as inline-block
.
Normally when you use inline-block
elements, you often use them inside a paragraph, so the space between the letters must be consistent. inline-block
elements apply to this rule too.
If you want to remove the space completely, you can float the elements.
float: left;
You can also remove the whitespace from your template document. Like so:
<input type="text" name="s" tabindex="2" /><input type="submit" value="Go!" class="btn" />
这篇关于我无法删除两个输入字段之间的边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!