Twitter bootstrap 3 将两个窗体和其他按钮对齐

Twitter bootstrap 3 将两个窗体和其他按钮对齐,twitter-bootstrap-3,Twitter Bootstrap 3,我有两个表单,每个表单都有多个隐藏字段和一个提交按钮。 我的目标是使用引导将这些表单与其他两个普通按钮水平(内联)对齐。 以下是我迄今为止所尝试的: <div class="container"> <div class="row"> <div class="col-xs-6"> <a class="btn btn-primary" href="/employees/new">Add new E

我有两个表单,每个表单都有多个隐藏字段和一个提交按钮。 我的目标是使用引导将这些表单与其他两个普通按钮水平(内联)对齐。 以下是我迄今为止所尝试的:

    <div class="container">
    <div class="row">
        <div class="col-xs-6">
            <a class="btn btn-primary" href="/employees/new">Add new Employee</a>
            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Search</button>
            <form class="form-inline" action="../reports/pdf/employees" method="GET">
                <input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
                <input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
                <input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
                <input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
                <input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
                <input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
                <input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
                <input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
                <input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
                <input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
                <button class="btn btn-primary" type="submit">Print pdf report</button> 
        </form>
        <form action="../reports/csv/employees" method="GET">
                <input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
                <input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
                <input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
                <input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
                <input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
                <input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
                <input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
                <input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
                <input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
                <input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
                <button class="btn btn-primary" type="submit">Print csv report</button> 
        </form>
    </div>

搜寻
打印pdf报告
打印csv报告
修正:将
表单内联添加到第二个表单

注意:

  • 表单是块项-通过css或样式更改为内联块
  • 按钮仍然缠绕,可能需要将
    col-xs-6
    更改为更宽的颜色
  • form.form-inline{
    显示:内联块
    }
    
    搜寻
    打印pdf报告
    打印csv报告
    
    
    form.form-inline{
    显示:内联块
    }
    搜寻
    打印pdf报告
    打印csv报告
    
    请展示您的尝试。