2017-08-09 93 views
0

我有一个搜索输入,然后一个HTML表格是这样的:布尔玛领域类不创建利润率底部

<form action="/providers/search" method="get"> 
    <div class="field has-addons"> 
     <div class="control"> 
      <input class="input" name="q" type="text" placeholder="Search for every columns"> 
     </div> 
     <div class="control"> 
      <button type="submit" class="button is-primary">Search</button> 
     </div> 
    </div> 
</form> 

<table class="table is-bordered is-striped is-narrow is-fullwidth" > 
    <thead> 
     <tr>   
      <th>Name</th> 
      <th>Website</th> 
      <th>Login</th> 
      <th>Password</th> 
      <th>Email</th> 
      <th>Description</th> 
      <th></th>  
     </tr> 
    </thead> 
    ... 
</table> 

问题是搜索输入直接堆栈上的HTML表格,我认了。字段类不会在输入和表之间创建边距。

这里就是我得到:

enter image description here

是有什么错吗?

回答

0

你可能在表单中的元素上使用浮点数吗?这可能是表单/容器元素没有正确高度的原因。

  • Quickfix使用overflow:隐藏在表单/容器元素上。
  • 清洁修复程序正在使用clearfix请参阅What is a clearfix?
  • 其他选项是使用flexbox而不是float元素,具体取决于您需要支持哪种浏览器。

如果我要走错方向,请提供您使用的CSS。

+0

我使用的是bulma css框架,这里是链接http://bulma.io/。我意识到,当我删除表单标签,它完美的作品。 – YouneL

+0

好的我从布尔玛检查了SASS。 我可以看到这个代码:.field:not(:last-child){margin-bottom:0.75rem; }所以在你的例子中,它是最后一个孩子,所以你没有底边。此外,我无法在表单元素上找到任何边距。 难道那里不仅有任何保证金底? 如果可能的话,你也许有一个地址可以测试你的这个例子吗? –