【问题标题】:How to fix html form size?如何修复html表单大小?
【发布时间】:2014-07-16 13:14:10
【问题描述】:

我有一张表格,表格很少。日期为提交按钮:

这是没有form标签的同一张表(只有input type="submit"):

如您所见,表单标签添加了新行。我怎样才能避免这种情况?

代码:

<form id="command" action="/wifi/selection" method="POST">
   <input type="hidden" name="beginDate" value="2014-06-30">
   <input type="hidden" name="endDate" value="">
   <input type="hidden" name="apId" value="1824">
   <input type="hidden" name="ssidId"
      value="42">
   <input type="submit" class="btn btn-link"
      value=" 2014-06-30" />
   <input type="hidden" name="_csrf" value="812810c6-9e41-434c-baec-b4db1680ce7a" />
</form>

【问题讨论】:

    标签: html forms twitter-bootstrap-3


    【解决方案1】:

    在表单上设置style="display: inline;" 可能会做到这一点。

    【讨论】:

      【解决方案2】:

      试试这个:

      <style type="text/css'>
      form {display:inline; margin:0px; padding:0px;}
      </style>
      

      此链接会有所帮助:How to prevent newline/line break within a <form></form>?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-10-11
        • 1970-01-01
        • 2020-02-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-06-04
        • 1970-01-01
        相关资源
        最近更新 更多